summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/uvm/uvm_glue.c')
-rw-r--r--sys/uvm/uvm_glue.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c
index aeb129d7646..c2e331eb087 100644
--- a/sys/uvm/uvm_glue.c
+++ b/sys/uvm/uvm_glue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_glue.c,v 1.39 2004/02/23 06:19:32 drahn Exp $ */
+/* $OpenBSD: uvm_glue.c,v 1.40 2005/05/25 23:17:47 niklas Exp $ */
/* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */
/*
@@ -80,6 +80,7 @@
#ifdef SYSVSHM
#include <sys/shm.h>
#endif
+#include <sys/sched.h>
#include <uvm/uvm.h>
@@ -380,13 +381,13 @@ uvm_swapin(p)
* moved to new physical page(s) (e.g. see mips/mips/vm_machdep.c).
*/
cpu_swapin(p);
- s = splstatclock();
+ SCHED_LOCK(s);
if (p->p_stat == SRUN)
setrunqueue(p);
p->p_flag |= P_INMEM;
p->p_flag &= ~P_SWAPIN;
- splx(s);
p->p_swtime = 0;
+ SCHED_UNLOCK(s);
++uvmexp.swapins;
}
@@ -577,16 +578,16 @@ uvm_swapout(p)
/*
* Mark it as (potentially) swapped out.
*/
- s = splstatclock();
+ SCHED_LOCK(s);
if (!(p->p_flag & P_INMEM)) {
- splx(s);
+ SCHED_UNLOCK(s);
return;
}
p->p_flag &= ~P_INMEM;
if (p->p_stat == SRUN)
remrunqueue(p);
- splx(s);
p->p_swtime = 0;
+ SCHED_UNLOCK(s);
++uvmexp.swapouts;
/*