summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-11-16 01:02:00 +0000
committerpjd <pjd@FreeBSD.org>2006-11-16 01:02:00 +0000
commit63d82b700dad091f36b4fdf7ac55bfe272a625ba (patch)
treefefa626382a1e038e96529f97a2dd9ce533319d8 /sys/kern/kern_synch.c
parentb33232cde3fde704b882dff91db2b12776b4b38f (diff)
downloadFreeBSD-src-63d82b700dad091f36b4fdf7ac55bfe272a625ba.zip
FreeBSD-src-63d82b700dad091f36b4fdf7ac55bfe272a625ba.tar.gz
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
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index b8082fd..3662902 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -188,7 +188,8 @@ msleep(ident, mtx, priority, wmesg, timo)
* stopped, then td will no longer be on a sleep queue upon
* return from cursig().
*/
- sleepq_add(ident, ident == &lbolt ? NULL : mtx, wmesg, flags);
+ sleepq_add(ident, ident == &lbolt ? NULL : &mtx->mtx_object, wmesg,
+ flags);
if (timo)
sleepq_set_timeout(ident, timo);
@@ -265,7 +266,7 @@ msleep_spin(ident, mtx, wmesg, timo)
/*
* We put ourselves on the sleep queue and start our timeout.
*/
- sleepq_add(ident, mtx, wmesg, SLEEPQ_MSLEEP);
+ sleepq_add(ident, &mtx->mtx_object, wmesg, SLEEPQ_MSLEEP);
if (timo)
sleepq_set_timeout(ident, timo);
OpenPOWER on IntegriCloud