- Assert that td_critnest > 0 in critical_exit() to catch cases of

unbalanced uses of the critical_* api.
This commit is contained in:
Jeff Roberson 2004-02-01 01:24:54 +00:00
parent a5c2a55d93
commit 6767c6547b

View File

@ -443,6 +443,8 @@ critical_exit(void)
{
struct thread *td;
KASSERT(td->td_critnest > 0,
("critical_exit: critnest < 0"));
td = curthread;
if (td->td_critnest == 1) {
td->td_critnest = 0;