Commit Graph

17 Commits

Author SHA1 Message Date
John Baldwin
2cdcea5ed8 Document the new return values for sleepq_abort(), sleepq_broadcast(), and
sleepq_signal().

Prodded by:	attilio
2008-08-07 20:47:01 +00:00
Gabor Kovesdan
9d77e05aff - Change the description of sleepq_add(), sleepq_broadcast() and
sleepq_signal() to reflect recent changes

Submitted by:	attilio
Approved by:	re (bmah)
2007-09-28 11:13:40 +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
32d2c58bd6 Document SLEEPQ_PAUSE. 2007-03-09 18:06:36 +00:00
Pawel Jakub Dawidek
7ee07175af Change sleepq_add(9) argument from 'struct mtx *' to 'struct lock_object *',
which allows to use it with different kinds of locks. For example it allows
to implement Solaris conditions variables which will be used in ZFS port on
top of sx(9) locks.

Reviewed by:	jhb
2006-11-16 01:02:00 +00:00
Joseph Koshy
265cd33757 Bring API documentation for sleepqueue(9) in sync with the code
in -current.

Reviewed by:	ru
2005-04-19 16:30:25 +00:00
Ruslan Ermilov
c0854fb7b2 Scheduled mdoc(7) sweep. 2005-01-12 21:48:25 +00:00
John Baldwin
68fdba2eb1 Catch up to recent API changes including the removal of the signal_caught
argument to sleepq_timedwait() and the enhancements to the flags argument
passed to sleepq_add().
2004-08-19 12:46:02 +00:00
Mike Pritchard
2988974b58 Spelling fixes. 2004-06-21 14:11:45 +00:00
Ruslan Ermilov
fa08fb73a5 Tiny markup fixes. 2004-06-16 15:47:45 +00:00
John Baldwin
bf0e60bbbb Rewrite sleepqueue manpage to catch up to the new sleep queue interface. 2004-03-12 19:07:18 +00:00
Ruslan Ermilov
b6ff0012db mdoc(7) police: finish up the "proc" -> "thread" conversion. 2002-01-10 12:55:36 +00:00
Chad David
f16b3c0de4 Update function definitions and required include files to reflect
the current state of the system.

Approved by: alfred
2001-12-26 23:14:04 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
John Baldwin
d265f30080 Add 2001 to copyright. 2001-03-09 03:17:18 +00:00
Ruslan Ermilov
9aa16122c1 mdoc(7) police: fixed some minor formatting/spelling errors. 2001-01-24 09:41:17 +00:00
John Baldwin
533ef7852a Document the current organization and helper functions used to implement
the sleep queues used by msleep/wakeup and friends.

Submitted by:	sheldonh
2001-01-23 19:24:35 +00:00