summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-12-26 20:48:22 +0000
committerphk <phk@FreeBSD.org>2002-12-26 20:48:22 +0000
commit2e1375146e69a4b465bd4fbe6f1a9c83a79e1168 (patch)
tree7d8b570453056471697a75bdf9e00cd433f4cac5 /sys
parent3d7762dd22bbe3d23a549be9fd679c327ba2eaa4 (diff)
downloadFreeBSD-src-2e1375146e69a4b465bd4fbe6f1a9c83a79e1168.zip
FreeBSD-src-2e1375146e69a4b465bd4fbe6f1a9c83a79e1168.tar.gz
Use a mutex assert to document our locking circumstances.
Diffstat (limited to 'sys')
-rw-r--r--sys/geom/geom_kern.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c
index 7debf34..3a20889 100644
--- a/sys/geom/geom_kern.c
+++ b/sys/geom/geom_kern.c
@@ -83,6 +83,7 @@ g_up_procbody(void)
struct thread *tp = FIRST_THREAD_IN_PROC(p);
struct mtx mymutex;
+ mtx_assert(&Giant, MA_NOTOWNED);
bzero(&mymutex, sizeof mymutex);
mtx_init(&mymutex, "g_up", MTX_DEF, 0);
mtx_lock(&mymutex);
@@ -108,6 +109,7 @@ g_down_procbody(void)
struct thread *tp = FIRST_THREAD_IN_PROC(p);
struct mtx mymutex;
+ mtx_assert(&Giant, MA_NOTOWNED);
bzero(&mymutex, sizeof mymutex);
mtx_init(&mymutex, "g_down", MTX_DEF, 0);
mtx_lock(&mymutex);
@@ -132,6 +134,7 @@ g_event_procbody(void)
struct proc *p = g_event_proc;
struct thread *tp = FIRST_THREAD_IN_PROC(p);
+ mtx_assert(&Giant, MA_NOTOWNED);
tp->td_base_pri = PRIBIO;
for(;;) {
g_run_events();
OpenPOWER on IntegriCloud