diff options
author | jhb <jhb@FreeBSD.org> | 2007-03-09 22:41:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-03-09 22:41:01 +0000 |
commit | f5e396934025920e30b32a3eef21d05548f16898 (patch) | |
tree | 343c44631b470578282dfd1c1d3fb73ed2833f3c /share/man/man9/mtx_pool.9 | |
parent | b470e17165153afeed8259afb043250b76f64e76 (diff) | |
download | FreeBSD-src-f5e396934025920e30b32a3eef21d05548f16898.zip FreeBSD-src-f5e396934025920e30b32a3eef21d05548f16898.tar.gz |
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.
Diffstat (limited to 'share/man/man9/mtx_pool.9')
-rw-r--r-- | share/man/man9/mtx_pool.9 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/share/man/man9/mtx_pool.9 b/share/man/man9/mtx_pool.9 index 0084bb5..0d6af1c 100644 --- a/share/man/man9/mtx_pool.9 +++ b/share/man/man9/mtx_pool.9 @@ -64,7 +64,7 @@ .Sh DESCRIPTION Mutex pools are designed to be used as short term leaf mutexes; i.e., the last mutex one might acquire before calling -.Xr msleep 9 . +.Xr mtx_sleep 9 . They operate using a shared pool of mutexes. A mutex may be chosen from the pool based on a supplied pointer, which may or may not point to anything valid, @@ -110,7 +110,7 @@ mutexes to interlock destructor operations. No initialization or destruction overhead. .It Can be used with -.Xr msleep 9 . +.Xr mtx_sleep 9 . .El .Pp And the following disadvantages: @@ -177,7 +177,6 @@ on each mutex in the specified pool, deallocates the memory associated with the pool, and assigns NULL to the pool pointer. .Sh SEE ALSO -.Xr msleep 9 , .Xr mutex 9 .Sh HISTORY These routines first appeared in |