From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 20 05:18:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23DB91065674 for ; Mon, 20 Jul 2009 05:18:37 +0000 (UTC) (envelope-from kaduk@MIT.EDU) Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by mx1.freebsd.org (Postfix) with ESMTP id 927248FC08 for ; Mon, 20 Jul 2009 05:18:37 +0000 (UTC) (envelope-from kaduk@MIT.EDU) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id n6K56t5U025719 for ; Mon, 20 Jul 2009 01:06:55 -0400 (EDT) Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id n6K56sqN019852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 20 Jul 2009 01:06:55 -0400 (EDT) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id n6K56rcZ023489; Mon, 20 Jul 2009 01:06:53 -0400 (EDT) Date: Mon, 20 Jul 2009 01:06:53 -0400 (EDT) From: Benjamin Kaduk To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Scanned-By: MIMEDefang 2.42 X-Spam-Flag: NO X-Spam-Score: 0.00 Subject: add missing content to locking.9 ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2009 05:18:38 -0000 Hi all, In trying to track down an unrelated issue, I happened to note that locking.9 needed a bit of help. They easy changes went into docs/136918, but I am less confident about my reading of the posix semaphore code. Would anyone care to comment on the following?: --- locking.9 2009-07-20 00:34:46.000000000 -0400 +++ locking.9.new 2009-07-20 00:31:27.000000000 -0400 @@ -215,6 +215,11 @@ a turnstile, its priority can propagate to the thread that holds the lock, helping to avoid a deadlock situation. .Ss Semaphores +.Tn POSIX +semaphores provide a wait channel in the filesystem namespace +whereby different threads can communicate with each other (by waiting +on the semaphore, and waking up the thread(s) waiting on that semaphore). +They are currently implemented on top of condition variables. .Ss Condition variables Condition variables are used in conjunction with mutexes to wait for conditions to occur. It should also be noted that there remains a comment "I don't know what the downsides are but I'm sure someone will fill in this part" regarding lockmgr locks ... I am not up for reading the code enough to comment, tonight, though. Thanks, Ben Kaduk