summaryrefslogtreecommitdiff
path: root/sys/kern/subr_sleepqueue.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove a bogus assertion and readd it in a more correct location. A threadJohn Baldwin2004-03-161-1/+1
| | | | | | | | | | | | might be enqueued on a sleep queue but not be asleep when the timeout fires if it is blocked on a lock trying to check for pending signals before going to sleep. In the case of fixing up the TDF_TIMEOUT race, however, the thread must be marked asleep. Reported by: kan (the bogus one) Notes: svn path=/head/; revision=127085
* - Remove old sleep queues.John Baldwin2004-03-121-1/+1
| | | | | | | | - Remove sleepqueue argument from sleepq_set_timeout() since it is not used. Notes: svn path=/head/; revision=126885
* Always assert that the passed in lock is the same as the saved lock in theJohn Baldwin2004-03-021-19/+1
| | | | | | | sleep queue now that the one abnormal case has been fixed. Notes: svn path=/head/; revision=126488
* Add an implementation of a generic sleep queue abstraction that is usedJohn Baldwin2004-02-271-0/+776
to queue threads sleeping on a wait channel similar to how turnstiles are used to queue threads waiting for a lock. This subsystem will be used as the backend for sleep/wakeup and condition variables initially. Eventually it will also be used to replace the ithread-specific iwait thread inhibitor. Sleep queues are also not locked by sched_lock, so this splits sched_lock up a bit further increasing concurrency within the scheduler. Sleep queues also natively support timeouts on sleeps and interruptible sleeps allowing for the reduction of a lot of duplicated code between the sleep/wakeup and condition variable implementations. For more details on the sleep queue implementation, check the comments in sys/sleepqueue.h and kern/subr_sleepqueue.c. Notes: svn path=/head/; revision=126324