diff options
author | jhb <jhb@FreeBSD.org> | 2004-02-27 18:33:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-02-27 18:33:09 +0000 |
commit | d07a9130c61961c9c61c5204f35f878403bfe123 (patch) | |
tree | 52d524ceb08c1525428b5b3954157df9b5fe311b /sys/kern/subr_turnstile.c | |
parent | b7f41a28068874730a2eefcf18859978cbae88c4 (diff) | |
download | FreeBSD-src-d07a9130c61961c9c61c5204f35f878403bfe123.zip FreeBSD-src-d07a9130c61961c9c61c5204f35f878403bfe123.tar.gz |
Add an implementation of a generic sleep queue abstraction that is used
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.
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r-- | sys/kern/subr_turnstile.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index e3a80d5..75141dd 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -54,11 +54,6 @@ * if there are any other waiters. If it is the only thread blocked on the * lock, then it reclaims the turnstile associated with the lock and removes * it from the hash table. - * - * XXX: We should probably implement some sort of sleep queue that condition - * variables and sleepqueue's share. On Solaris condition variables are - * implemented using a hash table of sleep queues similar to our current - * sleep queues. We might want to investigate doing that ourselves. */ #include <sys/cdefs.h> |