svn commit: r210551 - head/lib/libc/sys

Edward Tomasz Napierala trasz at FreeBSD.org
Tue Jul 27 20:34:38 UTC 2010


Author: trasz
Date: Tue Jul 27 20:34:37 2010
New Revision: 210551
URL: http://svn.freebsd.org/changeset/base/210551

Log:
  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

Modified:
  head/lib/libc/sys/mlock.2
  head/lib/libc/sys/mlockall.2

Modified: head/lib/libc/sys/mlock.2
==============================================================================
--- head/lib/libc/sys/mlock.2	Tue Jul 27 20:33:50 2010	(r210550)
+++ head/lib/libc/sys/mlock.2	Tue Jul 27 20:34:37 2010	(r210551)
@@ -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

Modified: head/lib/libc/sys/mlockall.2
==============================================================================
--- head/lib/libc/sys/mlockall.2	Tue Jul 27 20:33:50 2010	(r210550)
+++ head/lib/libc/sys/mlockall.2	Tue Jul 27 20:34:37 2010	(r210551)
@@ -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.


More information about the svn-src-head mailing list