diff options
author | jhb <jhb@FreeBSD.org> | 2003-12-09 21:09:54 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-12-09 21:09:54 +0000 |
commit | f110a9ab64ec722689aec2bb4fcb522150e0c81c (patch) | |
tree | 77d360a69e881126d1cee92659e1545c563a0380 /sys/kern/subr_turnstile.c | |
parent | 66cc89fadfbdc13372fd21d89b6a300f5a2f35d0 (diff) | |
download | FreeBSD-src-f110a9ab64ec722689aec2bb4fcb522150e0c81c.zip FreeBSD-src-f110a9ab64ec722689aec2bb4fcb522150e0c81c.tar.gz |
Assert that the we never give a thread a NULL turnstile when waking it up.
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r-- | sys/kern/subr_turnstile.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |