- Assert that td_critnest > 0 in critical_exit() to catch cases of
unbalanced uses of the critical_* api.
This commit is contained in:
parent
a5c2a55d93
commit
6767c6547b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user