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:
John Baldwin 2001-03-07 03:20:15 +00:00
parent 88411ba791
commit ff655691d8
6 changed files with 12 additions and 7 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();