add missing content to locking.9 ?

Benjamin Kaduk kaduk at MIT.EDU
Mon Jul 20 05:18:38 UTC 2009


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


More information about the freebsd-hackers mailing list