diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-21 14:45:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-21 14:45:30 +0000 |
commit | 2967f9d4ba55ef9eb3cddf411aa5aa2aa4cbbd3f (patch) | |
tree | 5445b32eb3c34891c6182256ab18643acdde3bc8 /sys | |
parent | 094850540557d7f50e6c053d237a3c69c52bb824 (diff) |
from netbsd; in swapin() do process queue removal at splstatclock instead of splhigh
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_glue.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index bf64a82c62d..df95fb03fb2 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -514,7 +514,7 @@ swapout(p) register struct proc *p; { vm_offset_t addr; - vm_size_t size; + int s; #ifdef DEBUG if (swapdebug & SDB_SWAPOUT) @@ -532,19 +532,18 @@ swapout(p) /* * Unwire the to-be-swapped process's user struct and kernel stack. */ - addr = (vm_offset_t) p->p_addr; - size = round_page(USPACE); - vm_map_pageable(kernel_map, addr, addr+size, TRUE); + addr = (vm_offset_t)p->p_addr; + vm_map_pageable(kernel_map, addr, addr + USPACE, TRUE); pmap_collect(vm_map_pmap(&p->p_vmspace->vm_map)); /* * Mark it as (potentially) swapped out. */ - (void) splhigh(); + s = splstatclock(); p->p_flag &= ~P_INMEM; if (p->p_stat == SRUN) remrq(p); - (void) spl0(); + splx(s); p->p_swtime = 0; } |