summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-06-07 05:39:16 +0000
committerjhb <jhb@FreeBSD.org>2002-06-07 05:39:16 +0000
commitfd3d90c2c85d318baf50e0a87f17c885c98ad010 (patch)
treee4ee6179ef21cf05b9b97149b299edee32f314e4 /sys/kern/kern_synch.c
parentfbebc83b5b089064d7d4f969ef3459ad64815af2 (diff)
downloadFreeBSD-src-fd3d90c2c85d318baf50e0a87f17c885c98ad010.zip
FreeBSD-src-fd3d90c2c85d318baf50e0a87f17c885c98ad010.tar.gz
- Catch up to new ktrace API.
- ktrace trace points in msleep() and cv_wait() no longer need Giant.
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c12
1 files changed, 5 insertions, 7 deletions
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);
OpenPOWER on IntegriCloud