Commit Graph

15 Commits

Author SHA1 Message Date
Attilio Rao
c709e029e7 Add manpages for rw_try_rlock() and rw_try_wlock() functions. 2008-04-01 20:56:45 +00:00
Pawel Jakub Dawidek
b12455f34e Implement soon-to-be-used rw_unlock() macro. 2008-03-16 17:10:52 +00:00
Pawel Jakub Dawidek
39887c5c2e Add missing .El. 2008-03-16 17:06:05 +00:00
Christian Brueffer
4faa4b080e Clean up after previous revision. 2007-11-25 16:14:32 +00:00
Attilio Rao
6442838d08 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 Elischer
a280550abf Add some cross references to locking.9 from related pages. 2007-03-30 18:07:26 +00:00
John Baldwin
e7573e7ad7 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
John Baldwin
b58aa2bde7 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
John Baldwin
7d3052bbc4 - Sort rwlock functions similar to the order in mutex(9).
- Add a missing MLINK.
2007-03-09 16:44:58 +00:00
Robert Watson
dd348217d7 Update rwlock(9) for rw_wowned(). 2007-02-26 19:07:41 +00:00
Ruslan Ermilov
bd84dd2f8f Revise markup. 2006-09-30 17:09:59 +00:00
Florent Thoumie
f1acac210b Fix typo (s/writeer/writer/). 2006-07-17 10:39:20 +00:00
John Baldwin
96cb5f9912 Document rw_try_upgrade() and rw_downgrade(). 2006-04-19 21:09:17 +00:00
John Baldwin
0b79fedb9b 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
Gleb Smirnoff
3182fc7b3e Document read/write locks.
Reviewed by:	jhb, ru
2006-02-01 19:39:25 +00:00