From owner-svn-src-head@FreeBSD.ORG  Tue Mar 19 05:44:26 2013
Return-Path: <owner-svn-src-head@FreeBSD.ORG>
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 15521FD;
 Tue, 19 Mar 2013 05:44:26 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 0219B319;
 Tue, 19 Mar 2013 05:44:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2J5iPKe054072;
 Tue, 19 Mar 2013 05:44:25 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
 by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2J5iP6G054071;
 Tue, 19 Mar 2013 05:44:25 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201303190544.r2J5iP6G054071@svn.freebsd.org>
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Tue, 19 Mar 2013 05:44:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r248489 - head/lib/libc/sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 <svn-src-head.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head>
List-Post: <mailto:svn-src-head@freebsd.org>
List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Mar 2013 05:44:26 -0000

Author: glebius
Date: Tue Mar 19 05:44:25 2013
New Revision: 248489
URL: http://svnweb.freebsd.org/changeset/base/248489

Log:
  There are actually two different cases when mlock(2) returns
  ENOMEM. Clarify this, taking text from SUS.
  
  Reviewed by:	kib

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

Modified: head/lib/libc/sys/mlock.2
==============================================================================
--- head/lib/libc/sys/mlock.2	Tue Mar 19 05:08:25 2013	(r248488)
+++ head/lib/libc/sys/mlock.2	Tue Mar 19 05:44:25 2013	(r248489)
@@ -28,7 +28,7 @@
 .\"	@(#)mlock.2	8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd December 25, 2012
+.Dd March 18, 2013
 .Dt MLOCK 2
 .Os
 .Sh NAME
@@ -138,7 +138,12 @@ is set to 0 and the caller is not the su
 .It Bq Er EINVAL
 The address given is not page aligned or the length is negative.
 .It Bq Er ENOMEM
-Some portion of the indicated address range is not allocated.
+Some or all of the address range specified by the addr and len
+arguments does not correspond to valid mapped pages in the address space
+of the process.
+.It Bq Er ENOMEM
+Locking the pages mapped by the specified range would exceed a limit on
+the amount of memory that the process may lock.
 .El
 .Sh "SEE ALSO"
 .Xr fork 2 ,