diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-12-16 06:54:09 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-12-16 06:54:09 +0000 |
commit | 7327d346fcb113617a486207f206df056b5bd56d (patch) | |
tree | 4517eb0f1d912f9b7fa16d26f25614aec2ce42a0 /sys/sys | |
parent | 8cd304e218e3d8dae124070e17be881517d28251 (diff) | |
download | FreeBSD-src-7327d346fcb113617a486207f206df056b5bd56d.zip FreeBSD-src-7327d346fcb113617a486207f206df056b5bd56d.tar.gz |
Add second sleep queue so that sx and lockmgr can have separate sleep
queues for shared and exclusive acquisitions
Submitted by: Attilio Rao
Approved by: jhb
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/proc.h | 1 | ||||
-rw-r--r-- | sys/sys/sleepqueue.h | 19 |
2 files changed, 11 insertions, 9 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index dd19f40..13e41e0 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -235,6 +235,7 @@ struct thread { int td_inhibitors; /* (j) Why can not run. */ int td_pflags; /* (k) Private thread (TDP_*) flags. */ int td_dupfd; /* (k) Ret value from fdopen. XXX */ + int td_sqqueue; /* (j) Sleepqueue queue blocked on. */ void *td_wchan; /* (j) Sleep address. */ const char *td_wmesg; /* (j) Reason for sleep. */ u_char td_lastcpu; /* (j) Last cpu we were on. */ diff --git a/sys/sys/sleepqueue.h b/sys/sys/sleepqueue.h index 0979726..19a231d 100644 --- a/sys/sys/sleepqueue.h +++ b/sys/sys/sleepqueue.h @@ -88,19 +88,20 @@ struct thread; void init_sleepqueues(void); void sleepq_abort(struct thread *td, int intrval); -void sleepq_add(void *, struct lock_object *, const char *, int); +void sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, + int flags, int queue); struct sleepqueue *sleepq_alloc(void); -void sleepq_broadcast(void *, int, int); -void sleepq_free(struct sleepqueue *); -void sleepq_lock(void *); -struct sleepqueue *sleepq_lookup(void *); -void sleepq_release(void *); -void sleepq_remove(struct thread *, void *); -void sleepq_signal(void *, int, int); +void sleepq_broadcast(void *wchan, int flags, int pri, int queue); +void sleepq_free(struct sleepqueue *sq); +void sleepq_lock(void *wchan); +struct sleepqueue *sleepq_lookup(void *wchan); +void sleepq_release(void *wchan); +void sleepq_remove(struct thread *td, void *wchan); +void sleepq_signal(void *wchan, int flags, int pri, int queue); void sleepq_set_timeout(void *wchan, int timo); int sleepq_timedwait(void *wchan); int sleepq_timedwait_sig(void *wchan); -void sleepq_wait(void *); +void sleepq_wait(void *wchan); int sleepq_wait_sig(void *wchan); #endif /* _KERNEL */ |