Use the proc lock to protect p_pptr when waking up our parent in cpu_exit()
and remove the mpfixme() message that is now fixed.
This commit is contained in:
parent
88411ba791
commit
ff655691d8
@ -246,6 +246,7 @@ cpu_exit(p)
|
||||
{
|
||||
alpha_fpstate_drop(p);
|
||||
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
mtx_unlock_flags(&Giant, MTX_NOSWITCH);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
@ -258,8 +259,8 @@ cpu_exit(p)
|
||||
*/
|
||||
p->p_stat = SZOMB;
|
||||
|
||||
mp_fixme("assumption: p_pptr won't change at this time");
|
||||
wakeup(p->p_pptr);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
||||
cnt.v_swtch++;
|
||||
cpu_switch();
|
||||
|
@ -253,6 +253,7 @@ cpu_exit(p)
|
||||
reset_dbregs();
|
||||
pcb->pcb_flags &= ~PCB_DBREGS;
|
||||
}
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
mtx_unlock_flags(&Giant, MTX_NOSWITCH);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
@ -265,8 +266,8 @@ cpu_exit(p)
|
||||
*/
|
||||
p->p_stat = SZOMB;
|
||||
|
||||
mp_fixme("assumption: p_pptr won't change at this time");
|
||||
wakeup(p->p_pptr);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
||||
cnt.v_swtch++;
|
||||
cpu_throw();
|
||||
|
@ -253,6 +253,7 @@ cpu_exit(p)
|
||||
reset_dbregs();
|
||||
pcb->pcb_flags &= ~PCB_DBREGS;
|
||||
}
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
mtx_unlock_flags(&Giant, MTX_NOSWITCH);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
@ -265,8 +266,8 @@ cpu_exit(p)
|
||||
*/
|
||||
p->p_stat = SZOMB;
|
||||
|
||||
mp_fixme("assumption: p_pptr won't change at this time");
|
||||
wakeup(p->p_pptr);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
||||
cnt.v_swtch++;
|
||||
cpu_throw();
|
||||
|
@ -295,7 +295,7 @@ cpu_exit(p)
|
||||
{
|
||||
ia64_fpstate_drop(p);
|
||||
|
||||
(void) splhigh();
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
mtx_unlock_flags(&Giant, MTX_NOSWITCH);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
@ -308,8 +308,8 @@ cpu_exit(p)
|
||||
*/
|
||||
p->p_stat = SZOMB;
|
||||
|
||||
mp_fixme("assumption: p_pptr won't change at this time");
|
||||
wakeup(p->p_pptr);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
||||
cnt.v_swtch++;
|
||||
cpu_switch();
|
||||
|
@ -246,6 +246,7 @@ cpu_exit(p)
|
||||
{
|
||||
alpha_fpstate_drop(p);
|
||||
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
mtx_unlock_flags(&Giant, MTX_NOSWITCH);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
@ -258,8 +259,8 @@ cpu_exit(p)
|
||||
*/
|
||||
p->p_stat = SZOMB;
|
||||
|
||||
mp_fixme("assumption: p_pptr won't change at this time");
|
||||
wakeup(p->p_pptr);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
||||
cnt.v_swtch++;
|
||||
cpu_switch();
|
||||
|
@ -246,6 +246,7 @@ cpu_exit(p)
|
||||
{
|
||||
alpha_fpstate_drop(p);
|
||||
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
mtx_unlock_flags(&Giant, MTX_NOSWITCH);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
@ -258,8 +259,8 @@ cpu_exit(p)
|
||||
*/
|
||||
p->p_stat = SZOMB;
|
||||
|
||||
mp_fixme("assumption: p_pptr won't change at this time");
|
||||
wakeup(p->p_pptr);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
||||
cnt.v_swtch++;
|
||||
cpu_switch();
|
||||
|
Loading…
x
Reference in New Issue
Block a user