From fd3d90c2c85d318baf50e0a87f17c885c98ad010 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 7 Jun 2002 05:39:16 +0000 Subject: - Catch up to new ktrace API. - ktrace trace points in msleep() and cv_wait() no longer need Giant. --- sys/kern/kern_synch.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/kern/kern_synch.c') diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 1615d57..9d959d2 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -423,8 +423,8 @@ msleep(ident, mtx, priority, wmesg, timo) WITNESS_SAVE_DECL(mtx); #ifdef KTRACE - if (p && KTRPOINT(p, KTR_CSW)) - ktrcsw(p->p_tracep, 1, 0); + if (KTRPOINT(td, KTR_CSW)) + ktrcsw(1, 0); #endif WITNESS_SLEEP(0, &mtx->mtx_object); KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL, @@ -533,13 +533,11 @@ msleep(ident, mtx, priority, wmesg, timo) } PROC_UNLOCK(p); } - PICKUP_GIANT(); #ifdef KTRACE - mtx_lock(&Giant); - if (KTRPOINT(p, KTR_CSW)) - ktrcsw(p->p_tracep, 0, 0); - mtx_unlock(&Giant); + if (KTRPOINT(td, KTR_CSW)) + ktrcsw(0, 0); #endif + PICKUP_GIANT(); if (mtx != NULL) { mtx_lock(mtx); WITNESS_RESTORE(&mtx->mtx_object, mtx); -- cgit v1.1