Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/pc532/pc532 Use preempt(), not an open-coded equiva...



details:   https://anonhg.NetBSD.org/src/rev/3ea34ee138de
branches:  trunk
changeset: 486526:3ea34ee138de
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 24 17:28:05 2000 +0000

description:
Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).

diffstat:

 sys/arch/pc532/pc532/trap.c |  17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diffs (39 lines):

diff -r 1d2d7fa6a5c9 -r 3ea34ee138de sys/arch/pc532/pc532/trap.c
--- a/sys/arch/pc532/pc532/trap.c       Wed May 24 16:48:33 2000 +0000
+++ b/sys/arch/pc532/pc532/trap.c       Wed May 24 17:28:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.37 1999/12/05 11:56:34 ragge Exp $  */
+/*     $NetBSD: trap.c,v 1.38 2000/05/24 17:28:05 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1996 Matthias Pfaller. All rights reserved.
@@ -101,7 +101,7 @@
        int pc;
        u_quad_t oticks;
 {
-       int sig, s;
+       int sig;
 
        /* take pending signals */
        while ((sig = CURSIG(p)) != 0)
@@ -109,18 +109,9 @@
        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);
        }



Home | Main Index | Thread Index | Old Index