summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-07 03:20:15 +0000
committerjhb <jhb@FreeBSD.org>2001-03-07 03:20:15 +0000
commit83d74ad162604ee6efa77212b10d224fbe60c16a (patch)
tree4b30011511a096eef264ce44bf797e387e007093 /sys
parent986245177032f492cf122ec82ba461acd1f4f7ce (diff)
downloadFreeBSD-src-83d74ad162604ee6efa77212b10d224fbe60c16a.zip
FreeBSD-src-83d74ad162604ee6efa77212b10d224fbe60c16a.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/vm_machdep.c3
-rw-r--r--sys/amd64/amd64/vm_machdep.c3
-rw-r--r--sys/i386/i386/vm_machdep.c3
-rw-r--r--sys/ia64/ia64/vm_machdep.c4
-rw-r--r--sys/powerpc/aim/vm_machdep.c3
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c3
6 files changed, 12 insertions, 7 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index e110d29..856d0bb 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -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();
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 2cc597a..0a15103 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -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();
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 2cc597a..0a15103 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -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();
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index 09ce462..e004110 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -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();
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index e110d29..856d0bb 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -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();
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index e110d29..856d0bb 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -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();
OpenPOWER on IntegriCloud