summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-10-15 20:17:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-10-15 20:17:23 +0000
commita677de6b98a134d62d985a15d990a75c0b1b0c2e (patch)
tree79be12edc76977fdeef141a3c4d11dbf4123501d
parenta9fb7d83c6ae316902707010b67c537ded7d8379 (diff)
Protect p_priority with splstatclock.
-rw-r--r--sys/kern/kern_synch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index cbae2829ff9..d2f08bed8f6 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.45 2002/07/24 17:58:49 mickey Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.46 2002/10/15 20:17:22 art Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -657,8 +657,8 @@ yield()
struct proc *p = curproc;
int s;
- p->p_priority = p->p_usrpri;
s = splstatclock();
+ p->p_priority = p->p_usrpri;
setrunqueue(p);
p->p_stats->p_ru.ru_nvcsw++;
mi_switch();
@@ -684,8 +684,8 @@ preempt(newp)
if (newp != NULL)
panic("preempt: cpu_preempt not yet implemented");
- p->p_priority = p->p_usrpri;
s = splstatclock();
+ p->p_priority = p->p_usrpri;
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();