diff options
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 6 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 6 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 6 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_exit.c | 1 | ||||
-rw-r--r-- | sys/powerpc/aim/vm_machdep.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powerpc/vm_machdep.c | 6 | ||||
-rw-r--r-- | sys/sparc64/sparc64/vm_machdep.c | 22 | ||||
-rw-r--r-- | sys/sys/proc.h | 1 |
9 files changed, 60 insertions, 0 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index 4209cce..e57593c 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -248,6 +248,12 @@ cpu_exit(td) } void +cpu_sched_exit(td) + register struct thread *td; +{ +} + +void cpu_wait(p) struct proc *p; { diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index a7e852a..5dc2e14 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -283,6 +283,12 @@ cpu_exit(td) } void +cpu_sched_exit(td) + register struct thread *td; +{ +} + +void cpu_wait(p) struct proc *p; { diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index a7e852a..5dc2e14 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -283,6 +283,12 @@ cpu_exit(td) } void +cpu_sched_exit(td) + register struct thread *td; +{ +} + +void cpu_wait(p) struct proc *p; { diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index 7a5c327..24ea100 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -314,6 +314,12 @@ cpu_exit(td) } void +cpu_sched_exit(td) + register struct thread *td; +{ +} + +void cpu_wait(p) struct proc *p; { diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index d35b3e1..fab9437 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -448,6 +448,7 @@ exit1(td, rv) binuptime(PCPU_PTR(switchtime)); PCPU_SET(switchticks, ticks); + cpu_sched_exit(td); cpu_throw(); panic("exit1"); } diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index 12aeaf2..fe9cab7 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -209,6 +209,12 @@ cpu_exit(td) } void +cpu_sched_exit(td) + register struct thread *td; +{ +} + +void cpu_wait(td) struct proc *td; { diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 12aeaf2..fe9cab7 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -209,6 +209,12 @@ cpu_exit(td) } void +cpu_sched_exit(td) + register struct thread *td; +{ +} + +void cpu_wait(td) struct proc *td; { diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 9fd910b..a896754 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -86,6 +86,28 @@ cpu_exit(struct thread *td) } } +void +cpu_sched_exit(struct thread *td) +{ + struct vmspace *vm; + struct pcpu *pc; + struct proc *p; + + mtx_assert(&sched_lock, MA_OWNED); + + p = td->td_proc; + vm = p->p_vmspace; + if (vm->vm_refcnt > 1) + return; + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + if (pc->pc_vmspace == vm) { + vm->vm_pmap.pm_active &= ~pc->pc_cpumask; + vm->vm_pmap.pm_context[pc->pc_cpuid] = -1; + pc->pc_vmspace = NULL; + } + } +} + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 9f37898..f37ade7 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -752,6 +752,7 @@ void userret(struct thread *, struct trapframe *, u_int); void maybe_resched(struct thread *); void cpu_exit(struct thread *); +void cpu_sched_exit(struct thread *); void exit1(struct thread *, int) __dead2; void cpu_fork(struct thread *, struct proc *, struct thread *, int); void cpu_set_fork_handler(struct thread *, void (*)(void *), void *); |