Use preempt(), not an open-coded equivalent (which won't be

equivalent for long).
This commit is contained in:
thorpej 2000-05-24 16:48:33 +00:00
parent 99bf72c6bb
commit 1140468205
21 changed files with 87 additions and 294 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.51 2000/03/01 02:22:03 thorpej Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -101,7 +101,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.51 2000/03/01 02:22:03 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -182,7 +182,7 @@ userret(p, pc, oticks)
u_int64_t pc;
u_quad_t oticks;
{
int sig, s;
int sig;
/* Do any deferred user pmap operations. */
PMAP_USERRET(vm_map_pmap(&p->p_vmspace->vm_map));
@ -193,18 +193,9 @@ userret(p, pc, oticks)
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
PMAP_USERRET(vm_map_pmap(&p->p_vmspace->vm_map));
while ((sig = CURSIG(p)) != 0)
postsig(sig);

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.72 1999/12/05 11:56:30 ragge Exp $ */
/* $NetBSD: trap.c,v 1.73 2000/05/24 16:48:34 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -218,7 +218,7 @@ userret(p, pc, oticks)
int pc;
u_quad_t oticks;
{
int sig, s;
int sig;
while ((sig = CURSIG(p)) != 0)
postsig(sig);
@ -227,18 +227,9 @@ userret(p, pc, oticks)
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we setrunqueue ourselves but before
* we switch'ed, we might not be on the queue indicated by
* our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ast.c,v 1.16 1999/03/24 05:50:53 mrg Exp $ */
/* $NetBSD: ast.c,v 1.17 2000/05/24 16:48:34 thorpej Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe
@ -68,7 +68,7 @@ userret(p, pc, oticks)
int pc;
u_quad_t oticks;
{
int sig, s;
int sig;
#ifdef DIAGNOSTIC
if (p == NULL)
@ -99,21 +99,9 @@ userret(p, pc, oticks)
if (want_resched) {
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
(void)splx(s);
preempt(NULL);
while ((sig = (CURSIG(p))) != 0) {
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: undefined.c,v 1.16 1999/03/30 10:10:57 mycroft Exp $ */
/* $NetBSD: undefined.c,v 1.17 2000/05/24 16:48:35 thorpej Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -127,7 +127,6 @@ undefinedinstruction(frame)
struct proc *p;
u_int fault_pc;
int fault_instruction;
int s;
int fault_code;
u_quad_t sticks = 0;
int coprocessor;
@ -194,7 +193,7 @@ undefinedinstruction(frame)
/* Fault has not been handled */
#ifdef VERBOSE_ARM32
s = spltty();
{ s = spltty();
if ((fault_instruction & 0x0f000010) == 0x0e000000) {
printf("CDP\n");
@ -214,7 +213,7 @@ undefinedinstruction(frame)
disassemble(fault_pc);
}
(void)splx(s);
(void)splx(s); }
#endif
if ((fault_code & FAULT_USER) == 0) {
@ -250,21 +249,9 @@ undefinedinstruction(frame)
if (want_resched) {
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
(void)splx(s);
preempt(NULL);
while ((sig = (CURSIG(p))) != 0) {
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: armfpe_init.c,v 1.16 1998/05/01 15:35:43 mark Exp $ */
/* $NetBSD: armfpe_init.c,v 1.17 2000/05/24 16:48:35 thorpej Exp $ */
/*
* Copyright (C) 1996 Mark Brinicombe
@ -179,7 +179,6 @@ arm_fpe_postproc(fpframe, frame)
u_int fpframe;
struct trapframe *frame;
{
register u_int s;
register int sig;
register struct proc *p;
@ -195,22 +194,10 @@ arm_fpe_postproc(fpframe, frame)
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
(void)splx(s);
/*
* We are being preempted.
*/
preempt(NULL);
while ((sig = (CURSIG(p))) != 0) {
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.48 2000/03/30 13:28:28 leo Exp $ */
/* $NetBSD: trap.c,v 1.49 2000/05/24 16:48:35 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -203,7 +203,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -215,18 +215,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.75 1999/12/05 11:56:32 ragge Exp $ */
/* $NetBSD: trap.c,v 1.76 2000/05/24 16:48:36 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -203,7 +203,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -215,18 +215,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.135 2000/05/11 16:38:12 jdolecek Exp $ */
/* $NetBSD: trap.c,v 1.136 2000/05/24 16:48:36 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -179,7 +179,7 @@ userret(p, pc, oticks)
int pc;
u_quad_t oticks;
{
int sig, s;
int sig;
/* take pending signals */
while ((sig = CURSIG(p)) != 0)
@ -187,18 +187,9 @@ userret(p, pc, oticks)
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.3 2000/01/11 08:24:14 nisimura Exp $ */
/* $NetBSD: trap.c,v 1.4 2000/05/24 16:48:37 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -44,7 +44,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.3 2000/01/11 08:24:14 nisimura Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.4 2000/05/24 16:48:37 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_execfmt.h"
@ -161,7 +161,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -173,18 +173,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.78 1999/12/12 08:18:49 scottr Exp $ */
/* $NetBSD: trap.c,v 1.79 2000/05/24 16:48:37 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -184,7 +184,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#if defined(M68040)
int beenhere = 0;
@ -198,18 +198,9 @@ again:
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we setrunqueue ourselves but before
* we switch'ed, we might not be on the queue indicated by
* our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.129 2000/05/15 06:45:44 nisimura Exp $ */
/* $NetBSD: trap.c,v 1.130 2000/05/24 16:48:39 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -44,7 +44,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.129 2000/05/15 06:45:44 nisimura Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.130 2000/05/24 16:48:39 thorpej Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_inet.h"
@ -197,20 +197,10 @@ userret(p, pc, sticks)
postsig(sig);
p->p_priority = p->p_usrpri;
if (want_resched) {
int s;
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.36 2000/03/18 22:33:07 scw Exp $ */
/* $NetBSD: trap.c,v 1.37 2000/05/24 16:48:40 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -207,7 +207,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -219,18 +219,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.1 1999/12/09 14:53:18 tsutsui Exp $ */
/* $NetBSD: trap.c,v 1.2 2000/05/24 16:48:41 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -193,7 +193,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -205,18 +205,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.19 1999/12/05 11:56:33 ragge Exp $ */
/* $NetBSD: trap.c,v 1.20 2000/05/24 16:48:41 thorpej Exp $ */
/*
* This file was taken from mvme68k/mvme68k/trap.c
@ -214,7 +214,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -226,18 +226,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.23 2000/01/19 03:30:13 danw Exp $ */
/* $NetBSD: trap.c,v 1.24 2000/05/24 16:48:41 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -326,21 +326,11 @@ brain_damage:
p->p_priority = p->p_usrpri;
if (want_resched) {
int s, sig;
int sig;
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while (sig = CURSIG(p))
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.9 2000/04/20 14:02:41 msaitoh Exp $ */
/* $NetBSD: trap.c,v 1.10 2000/05/24 16:48:42 thorpej Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@ -99,7 +99,7 @@ userret(p, pc, oticks)
int pc;
u_quad_t oticks;
{
int sig, s;
int sig;
/* take pending signals */
while ((sig = CURSIG(p)) != 0)
@ -107,18 +107,9 @@ userret(p, pc, oticks)
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, a clock interrupt could
* change our priority without changing run queues
* (the running process is not kept on a run queue).
* If this happened after we setrunqueue ourselves but
* before we switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.88 2000/02/08 03:16:00 mycroft Exp $ */
/* $NetBSD: trap.c,v 1.89 2000/05/24 16:48:42 thorpej Exp $ */
/*
* Copyright (c) 1996
@ -228,18 +228,9 @@ userret(p, pc, oticks)
}
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we switched, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
(void) splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
(void) spl0();
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.38 2000/04/18 02:07:57 eeh Exp $ */
/* $NetBSD: trap.c,v 1.39 2000/05/24 16:48:43 thorpej Exp $ */
/*
* Copyright (c) 1996
@ -437,18 +437,9 @@ userret(p, pc, oticks)
}
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we switched, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
(void) splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
(void) spl0();
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.87 1999/12/05 11:56:36 ragge Exp $ */
/* $NetBSD: trap.c,v 1.88 2000/05/24 16:48:43 thorpej Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@ -188,7 +188,7 @@ userret(p, tf, oticks)
register struct trapframe *tf;
u_quad_t oticks;
{
int sig, s;
int sig;
/* take pending signals */
while ((sig = CURSIG(p)) != 0)
@ -198,18 +198,9 @@ userret(p, tf, oticks)
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.48 2000/03/19 14:56:54 ragge Exp $ */
/* $NetBSD: trap.c,v 1.49 2000/05/24 16:48:44 thorpej Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -273,16 +273,9 @@ if(faultdebug)printf("trap accflt type %lx, code %lx, pc %lx, psl %lx\n",
if (want_resched) {
#endif
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we setrunqueue ourselves but before
* we swtch()'ed, we might not be on the queue indicated by
* our priority.
* We are being preempted.
*/
splstatclock();
setrunqueue(p);
mi_switch();
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}
@ -403,16 +396,9 @@ bad:
if (want_resched) {
#endif
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we setrunqueue ourselves but before
* we swtch()'ed, we might not be on the queue indicated by
* our priority.
* We are being preempted.
*/
splstatclock();
setrunqueue(p);
mi_switch();
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.37 2000/04/18 21:06:12 minoura Exp $ */
/* $NetBSD: trap.c,v 1.38 2000/05/24 16:48:44 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -205,7 +205,7 @@ userret(p, fp, oticks, faultaddr, fromtrap)
u_int faultaddr;
int fromtrap;
{
int sig, s;
int sig;
#ifdef M68040
int beenhere = 0;
@ -217,18 +217,9 @@ again:
p->p_priority = p->p_usrpri;
if (want_resched) {
/*
* Since we are curproc, clock will normally just change
* our priority without moving us from one queue to another
* (since the running process is not on a queue.)
* If that happened after we put ourselves on the run queue
* but before we mi_switch()'ed, we might not be on the queue
* indicated by our priority.
* We are being preempted.
*/
s = splstatclock();
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
preempt(NULL);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}