diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-06-05 11:03:06 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-06-05 11:03:06 +0000 |
commit | a9373777186bac0acc8148d4108429a9fc82c3c7 (patch) | |
tree | 42ea358aca2501d0078055c9026a71cb55ab667c /sys/arch/kbus | |
parent | 7f0672f1404b8202f54f66098bec7fd4b3e6725b (diff) |
Changes to exit handling.
cpu_exit no longer frees the vmspace and u-area. This is now handled by a
separate kernel thread "reaper". This is to avoid sleeping locks in the
critical path of cpu_exit where we're not allowed to sleep.
From NetBSD
Diffstat (limited to 'sys/arch/kbus')
-rw-r--r-- | sys/arch/kbus/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/kbus/kbus/locore.s | 8 | ||||
-rw-r--r-- | sys/arch/kbus/kbus/vm_machdep.c | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/kbus/include/pmap.h b/sys/arch/kbus/include/pmap.h index 228516d859a..7f338b611d8 100644 --- a/sys/arch/kbus/include/pmap.h +++ b/sys/arch/kbus/include/pmap.h @@ -294,7 +294,8 @@ void pmap_bootstrap __P((vm_offset_t firstaddr)); void pmap_disp_va __P((pmap_t pmap, vm_offset_t va)); vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); struct user; -void switchexit __P((vm_map_t, struct user *, int)); +struct proc; +void switchexit __P((struct proc *)); #endif /* _KERNEL */ #endif /* !_LOCORE */ diff --git a/sys/arch/kbus/kbus/locore.s b/sys/arch/kbus/kbus/locore.s index 7c63f5c7938..97945eab30c 100644 --- a/sys/arch/kbus/kbus/locore.s +++ b/sys/arch/kbus/kbus/locore.s @@ -3087,8 +3087,6 @@ ENTRY(write_user_windows) */ ENTRY(switchexit) mov %o0, %g2 ! save the - mov %o1, %g3 ! ... three parameters - mov %o2, %g4 ! ... to kmem_free /* * Change pcb to idle u. area, i.e., set %sp to top of stack @@ -3119,10 +3117,8 @@ ENTRY(switchexit) SET_SP_REDZONE(%l6, %l5) #endif wr %g0, PSR_S|PSR_ET, %psr ! and then enable traps - mov %g2, %o0 ! now ready to call kmem_free - mov %g3, %o1 - call _kmem_free - mov %g4, %o2 + call _exit2 + mov %g2, %o0 /* * Now fall through to `the last switch'. %g6 was set to diff --git a/sys/arch/kbus/kbus/vm_machdep.c b/sys/arch/kbus/kbus/vm_machdep.c index 7c054c2029f..c80e06aa8d2 100644 --- a/sys/arch/kbus/kbus/vm_machdep.c +++ b/sys/arch/kbus/kbus/vm_machdep.c @@ -437,8 +437,8 @@ cpu_exit(p) } free((void *)fs, M_SUBPROC); } - vmspace_free(p->p_vmspace); - switchexit(kernel_map, p->p_addr, USPACE); + + switchexit(p); /* NOTREACHED */ } |