summaryrefslogtreecommitdiff
path: root/sys/kern/subr_turnstile.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2008-02-06 01:02:13 +0000
committerJeff Roberson <jeff@FreeBSD.org>2008-02-06 01:02:13 +0000
commit5dff04c31f18fe0a5e00e8c79b37537bb68a15ea (patch)
tree5bef34d7805971aa4bece9b058097a604c9778de /sys/kern/subr_turnstile.c
parentabd94b3d59adb3c538c625aaa2b45e12fbe99534 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r--sys/kern/subr_turnstile.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index 269faca8cb4b..aa674ca4d3a9 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -674,8 +674,6 @@ turnstile_wait(struct turnstile *ts, struct thread *owner, int queue)
td = curthread;
mtx_assert(&ts->ts_lock, MA_OWNED);
- if (queue == TS_SHARED_QUEUE)
- MPASS(owner != NULL);
if (owner)
MPASS(owner->td_proc->p_magic == P_MAGIC);
MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE);
@@ -766,8 +764,7 @@ turnstile_signal(struct turnstile *ts, int queue)
MPASS(ts != NULL);
mtx_assert(&ts->ts_lock, MA_OWNED);
MPASS(curthread->td_proc->p_magic == P_MAGIC);
- MPASS(ts->ts_owner == curthread ||
- (queue == TS_EXCLUSIVE_QUEUE && ts->ts_owner == NULL));
+ MPASS(ts->ts_owner == curthread || ts->ts_owner == NULL);
MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE);
/*
@@ -818,8 +815,7 @@ turnstile_broadcast(struct turnstile *ts, int queue)
MPASS(ts != NULL);
mtx_assert(&ts->ts_lock, MA_OWNED);
MPASS(curthread->td_proc->p_magic == P_MAGIC);
- MPASS(ts->ts_owner == curthread ||
- (queue == TS_EXCLUSIVE_QUEUE && ts->ts_owner == NULL));
+ MPASS(ts->ts_owner == curthread || ts->ts_owner == NULL);
/*
* We must have the chain locked so that we can remove the empty
* turnstile from the hash queue.
@@ -869,8 +865,7 @@ turnstile_unpend(struct turnstile *ts, int owner_type)
MPASS(ts != NULL);
mtx_assert(&ts->ts_lock, MA_OWNED);
- MPASS(ts->ts_owner == curthread ||
- (owner_type == TS_SHARED_LOCK && ts->ts_owner == NULL));
+ MPASS(ts->ts_owner == curthread || ts->ts_owner == NULL);
MPASS(!TAILQ_EMPTY(&ts->ts_pending));
/*