Commit Graph

12 Commits

Author SHA1 Message Date
brueffer
fe29db8e3b Clean up after previous revision. 2007-11-25 16:14:32 +00:00
attilio
eda62b5e41 Update rwlock(9) manpage adding missing bits about the rw_init_flags()
function, its options and explaining that recursion for writers can be
selectively enabled.

Reported by: rwatson, Skip Ford <skip at menantico dot com>
2007-11-25 01:53:58 +00:00
julian
3f8481620d Add some cross references to locking.9 from related pages. 2007-03-30 18:07:26 +00:00
jhb
f5e3969340 Allow threads to atomically release rw and sx locks while waiting for an
event.  Locking primitives that support this (mtx, rw, and sx) now each
include their own foo_sleep() routine.
- Rename msleep() to _sleep() and change it's 'struct mtx' object to a
  'struct lock_object' pointer.  _sleep() uses the recently added
  lc_unlock() and lc_lock() function pointers for the lock class of the
  specified lock to release the lock while the thread is suspended.
- Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks
  (rw_sleep()), and sx locks (sx_sleep()).  msleep() still exists and
  is now identical to mtx_sleep(), but it is deprecated.
- Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP.
- Rewrite much of sleep.9 to not be msleep(9) centric.
- Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS'
  section.
- Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will
  warn if you try to pass a NULL wait channel.  The functions already have
  a KASSERT to that effect.
2007-03-09 22:41:01 +00:00
jhb
bf4e259df6 Place mtx_destroy() and rw_destroy() right after mtx_init() and rw_init()
to match sx(9) and condvar(9).
2007-03-09 16:54:03 +00:00
jhb
24c3d87828 - Sort rwlock functions similar to the order in mutex(9).
- Add a missing MLINK.
2007-03-09 16:44:58 +00:00
rwatson
35d54d13a9 Update rwlock(9) for rw_wowned(). 2007-02-26 19:07:41 +00:00
ru
e06dc5d45d Revise markup. 2006-09-30 17:09:59 +00:00
flz
7a20d1a680 Fix typo (s/writeer/writer/). 2006-07-17 10:39:20 +00:00
jhb
23bed816e2 Document rw_try_upgrade() and rw_downgrade(). 2006-04-19 21:09:17 +00:00
jhb
aa021f0145 Various nits and fixups so that the text reads smoother in several places.
Also, more closely match the prototypes in sys/rwlock.h and add a BUGS
section.
2006-04-19 20:43:35 +00:00
glebius
70f2cce3e4 Document read/write locks.
Reviewed by:	jhb, ru
2006-02-01 19:39:25 +00:00