summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2010-07-27 20:34:37 +0000
committertrasz <trasz@FreeBSD.org>2010-07-27 20:34:37 +0000
commit67e30607a07f2ac1d74598af807d2fbf1457c2f1 (patch)
treef7a42eca4cbbccddb08421fb07b027260b9033b3
parentf27c8b35e2b318d78a7d1b1a5da79b6443afc069 (diff)
downloadFreeBSD-src-67e30607a07f2ac1d74598af807d2fbf1457c2f1.zip
FreeBSD-src-67e30607a07f2ac1d74598af807d2fbf1457c2f1.tar.gz
Update mlockall(2) to mention that it's superuser-only syscall, just
like the mlock(2) manual page says. Update mlock(2) to say that hitting RLIMIT_MEMLOCK results in ENOMEM, not EAGAIN. MFC after: 1 month
-rw-r--r--lib/libc/sys/mlock.27
-rw-r--r--lib/libc/sys/mlockall.24
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
index 0c05b7b..ed9c15a 100644
--- a/lib/libc/sys/mlock.2
+++ b/lib/libc/sys/mlock.2
@@ -28,7 +28,7 @@
.\" @(#)mlock.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd August 10, 2004
+.Dd July 27, 2010
.Dt MLOCK 2
.Os
.Sh NAME
@@ -116,11 +116,12 @@ The caller is not the super-user.
.It Bq Er EINVAL
The address given is not page aligned or the length is negative.
.It Bq Er EAGAIN
-Locking the indicated range would exceed either the system or per-process
-limit for locked memory.
+Locking the indicated range would exceed the system limit for locked memory.
.It Bq Er ENOMEM
Some portion of the indicated address range is not allocated.
There was an error faulting/mapping a page.
+Locking the indicated range would exceed the per-process limit for locked
+memory.
.El
The
.Fn munlock
diff --git a/lib/libc/sys/mlockall.2 b/lib/libc/sys/mlockall.2
index d09ce27..54ae23e 100644
--- a/lib/libc/sys/mlockall.2
+++ b/lib/libc/sys/mlockall.2
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 12, 1999
+.Dd July 27, 2010
.Dt MLOCKALL 2
.Os
.Sh NAME
@@ -72,6 +72,8 @@ limit and the per-process
.Dv RLIMIT_MEMLOCK
resource limit.
.Pp
+These calls are only available to the super-user.
+.Pp
The
.Fn munlockall
call unlocks any locked memory regions in the process address space.
OpenPOWER on IntegriCloud