Don't perform an mi_switch() when we release Giant during cpu_exit(). We

are about to call cpu_switch() anyways.

Found by:	witness
This commit is contained in:
John Baldwin 2000-11-15 19:44:38 +00:00
parent 5f90cac7f1
commit 7e4b7c97de
4 changed files with 8 additions and 4 deletions

View File

@ -255,7 +255,8 @@ cpu_exit(p)
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);
cnt.v_swtch++;
cpu_switch();
panic("cpu_exit");

View File

@ -304,7 +304,8 @@ cpu_exit(p)
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);
cnt.v_swtch++;
cpu_switch();
panic("cpu_exit");

View File

@ -255,7 +255,8 @@ cpu_exit(p)
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);
cnt.v_swtch++;
cpu_switch();
panic("cpu_exit");

View File

@ -255,7 +255,8 @@ cpu_exit(p)
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);
cnt.v_swtch++;
cpu_switch();
panic("cpu_exit");