From owner-svn-src-all@FreeBSD.ORG Sat Jan 9 05:40:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6AC01065676; Sat, 9 Jan 2010 05:40:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA228FC0A; Sat, 9 Jan 2010 05:40:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o095ek0o008551; Sat, 9 Jan 2010 05:40:46 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o095ekeT008548; Sat, 9 Jan 2010 05:40:46 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001090540.o095ekeT008548@svn.freebsd.org> From: David Xu Date: Sat, 9 Jan 2010 05:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201884 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 05:40:46 -0000 Author: davidxu Date: Sat Jan 9 05:40:46 2010 New Revision: 201884 URL: http://svn.freebsd.org/changeset/base/201884 Log: Update manual for sem_init and sem_open, restrictions of shared semaphore and 14 characters in name length no longer exist. Reviewed by: deischen@ Modified: head/lib/libc/gen/sem_init.3 head/lib/libc/gen/sem_open.3 Modified: head/lib/libc/gen/sem_init.3 ============================================================================== --- head/lib/libc/gen/sem_init.3 Sat Jan 9 04:59:57 2010 (r201883) +++ head/lib/libc/gen/sem_init.3 Sat Jan 9 05:40:46 2010 (r201884) @@ -46,9 +46,19 @@ function initializes the unnamed semapho .Fa sem to have the value .Fa value . +.Pp A non-zero value for .Fa pshared -specifies a shared semaphore that can be used by multiple processes. +specifies a shared semaphore that can be used by multiple processes, +the semaphore should be located in shared memory region (see +.Xr mmap 2 , +.Xr shm_open 2 , +and +.Xr shmget 2 ) , +any process having read and write access to address +.Fa sem +can perform semaphore operations on +.Fa sem . .Pp Following a successful call to .Fn sem_init , Modified: head/lib/libc/gen/sem_open.3 ============================================================================== --- head/lib/libc/gen/sem_open.3 Sat Jan 9 04:59:57 2010 (r201883) +++ head/lib/libc/gen/sem_open.3 Sat Jan 9 05:40:46 2010 (r201884) @@ -58,6 +58,12 @@ The returned semaphore may be used in su and .Fn sem_close . .Pp +This implementation places strict requirements on the value of +.Fa name : +it must begin with a slash +.Pq Ql / , +contain no other slash characters. +.Pp The following bits may be set in the .Fa oflag argument: @@ -217,11 +223,3 @@ functions conform to .Sh HISTORY Support for named semaphores first appeared in .Fx 5.0 . -.Sh BUGS -This implementation places strict requirements on the value of -.Fa name : -it must begin with a slash -.Pq Ql / , -contain no other slash characters, -and be less than 14 characters in length -not including the terminating null character.