diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-02-01 02:31:36 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-02-01 02:31:36 +0000 |
commit | a76f13b9f3bffaf23ec8f99394cf21abbf54fd13 (patch) | |
tree | 10c8d0f1868c31d31555d48d2df2207ec62827d3 /sys/kern | |
parent | 79b1e091999ee0854e935b20d940ca2db3eaf661 (diff) | |
download | FreeBSD-src-a76f13b9f3bffaf23ec8f99394cf21abbf54fd13.zip FreeBSD-src-a76f13b9f3bffaf23ec8f99394cf21abbf54fd13.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_switch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index a8ead79..2776f7e 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -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(); |