Move KASSERT regarding td_critnest to after the value of td is set to

curthread, to avoid warning and incorrect behavior.

Hoped not to mind:	jeff
This commit is contained in:
Robert Watson 2004-02-01 02:31:36 +00:00
parent 6767c6547b
commit fca542bcaa

View file

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