--- sys/kern/kern_condvar.c 2006/02/23 00:15:20 +++ sys/kern/kern_condvar.c 2006/08/22 18:41:42 @@ -149,7 +149,7 @@ DROP_GIANT(); mtx_unlock(mp); - sleepq_add(cvp, mp, cvp->cv_description, SLEEPQ_CONDVAR); + sleepq_add(cvp, &mp->mtx_object, cvp->cv_description, SLEEPQ_CONDVAR); sleepq_wait(cvp); PICKUP_GIANT(); @@ -196,7 +196,7 @@ DROP_GIANT(); mtx_unlock(mp); - sleepq_add(cvp, mp, cvp->cv_description, SLEEPQ_CONDVAR | + sleepq_add(cvp, &mp->mtx_object, cvp->cv_description, SLEEPQ_CONDVAR | SLEEPQ_INTERRUPTIBLE); rval = sleepq_wait_sig(cvp); @@ -250,7 +250,7 @@ DROP_GIANT(); mtx_unlock(mp); - sleepq_add(cvp, mp, cvp->cv_description, SLEEPQ_CONDVAR); + sleepq_add(cvp, &mp->mtx_object, cvp->cv_description, SLEEPQ_CONDVAR); sleepq_set_timeout(cvp, timo); rval = sleepq_timedwait(cvp); @@ -307,7 +307,7 @@ DROP_GIANT(); mtx_unlock(mp); - sleepq_add(cvp, mp, cvp->cv_description, SLEEPQ_CONDVAR | + sleepq_add(cvp, &mp->mtx_object, cvp->cv_description, SLEEPQ_CONDVAR | SLEEPQ_INTERRUPTIBLE); sleepq_set_timeout(cvp, timo); rval = sleepq_timedwait_sig(cvp); --- sys/kern/kern_synch.c 2006/10/26 21:47:18 +++ sys/kern/kern_synch.c 2006/10/29 01:59:36 @@ -188,7 +188,7 @@ * stopped, then td will no longer be on a sleep queue upon * return from cursig(). */ - sleepq_add(ident, mtx, wmesg, flags); + sleepq_add(ident, &mtx->mtx_object, wmesg, flags); if (timo) sleepq_set_timeout(ident, timo); @@ -265,7 +265,7 @@ /* * 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); --- sys/kern/subr_sleepqueue.c 2006/04/21 20:47:06 +++ sys/kern/subr_sleepqueue.c 2006/08/22 18:41:42 @@ -120,7 +120,7 @@ void *sq_wchan; /* (c) Wait channel. */ #ifdef INVARIANTS int sq_type; /* (c) Queue type. */ - struct mtx *sq_lock; /* (c) Associated lock. */ + struct lock_object *sq_lock; /* (c) Associated lock. */ #endif }; @@ -262,7 +262,7 @@ * woken up. */ void -sleepq_add(void *wchan, struct mtx *lock, const char *wmesg, int flags) +sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags) { struct sleepqueue_chain *sc; struct sleepqueue *sq; @@ -895,7 +895,7 @@ #ifdef INVARIANTS db_printf("Queue type: %d\n", sq->sq_type); if (sq->sq_lock) { - lock = &sq->sq_lock->mtx_object; + lock = sq->sq_lock; db_printf("Associated Interlock: %p - (%s) %s\n", lock, LOCK_CLASS(lock)->lc_name, lock->lo_name); } --- sys/sys/sleepqueue.h 2006/02/15 23:55:18 +++ sys/sys/sleepqueue.h 2006/08/22 18:41:42 @@ -75,7 +75,7 @@ * using this interface as well (death to TDI_IWAIT!) */ -struct mtx; +struct lock_object; struct sleepqueue; struct thread; @@ -88,7 +88,7 @@ void init_sleepqueues(void); void sleepq_abort(struct thread *td, int intrval); -void sleepq_add(void *, struct mtx *, const char *, int); +void sleepq_add(void *, struct lock_object *, const char *, int); struct sleepqueue *sleepq_alloc(void); void sleepq_broadcast(void *, int, int); void sleepq_free(struct sleepqueue *);