From f110a9ab64ec722689aec2bb4fcb522150e0c81c Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 9 Dec 2003 21:09:54 +0000 Subject: Assert that the we never give a thread a NULL turnstile when waking it up. --- sys/kern/subr_turnstile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern') diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index baf5d8e..54458ef 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -561,6 +561,7 @@ turnstile_signal(struct turnstile *ts) MPASS(LIST_EMPTY(&ts->ts_free)); else ts = LIST_FIRST(&ts->ts_free); + MPASS(ts != NULL); LIST_REMOVE(ts, ts_hash); td->td_turnstile = ts; @@ -601,6 +602,7 @@ turnstile_wakeup(struct turnstile *ts) ts1 = ts; } else ts1 = LIST_FIRST(&ts->ts_free); + MPASS(ts1 != NULL); LIST_REMOVE(ts1, ts_hash); td->td_turnstile = ts1; } -- cgit v1.1