BSD 4_4_Lite1 release
[unix-history] / usr / src / sys / hp300 / hp300 / trap.c
index c16d872..16f73d5 100644 (file)
@@ -37,7 +37,7 @@
  *
  * from: Utah $Hdr: trap.c 1.37 92/12/20$
  *
  *
  * from: Utah $Hdr: trap.c 1.37 92/12/20$
  *
- *     @(#)trap.c      8.1 (Berkeley) 6/16/93
+ *     @(#)trap.c      8.5 (Berkeley) 1/4/94
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -146,30 +146,30 @@ again:
 #endif
        /* take pending signals */
        while ((sig = CURSIG(p)) != 0)
 #endif
        /* take pending signals */
        while ((sig = CURSIG(p)) != 0)
-               psig(sig);
-       p->p_pri = p->p_usrpri;
+               postsig(sig);
+       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 (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 setrq ourselves but before we
-                * swtch()'ed, we might not be on the queue indicated by
-                * our priority.
+                * 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.
                 */
                s = splstatclock();
                 */
                s = splstatclock();
-               setrq(p);
+               setrunqueue(p);
                p->p_stats->p_ru.ru_nivcsw++;
                p->p_stats->p_ru.ru_nivcsw++;
-               swtch();
+               mi_switch();
                splx(s);
                while ((sig = CURSIG(p)) != 0)
                splx(s);
                while ((sig = CURSIG(p)) != 0)
-                       psig(sig);
+                       postsig(sig);
        }
 
        /*
         * If profiling, charge system time to the trapped pc.
         */
        }
 
        /*
         * If profiling, charge system time to the trapped pc.
         */
-       if (p->p_flag & SPROFIL) {
+       if (p->p_flag & P_PROFIL) {
                extern int psratio;
 
                addupc_task(p, fp->f_pc,
                extern int psratio;
 
                addupc_task(p, fp->f_pc,
@@ -201,7 +201,7 @@ again:
                }
        }
 #endif
                }
        }
 #endif
-       curpri = p->p_pri;
+       curpriority = p->p_priority;
 }
 
 /*
 }
 
 /*
@@ -216,12 +216,11 @@ trap(type, code, v, frame)
        register unsigned v;
        struct frame frame;
 {
        register unsigned v;
        struct frame frame;
 {
-       register int i;
-       unsigned ucode;
+       extern char fswintr[];
        register struct proc *p;
        register struct proc *p;
+       register int i;
+       u_int ucode;
        u_quad_t sticks;
        u_quad_t sticks;
-       unsigned ncode;
-       extern char fswintr[];
 
        cnt.v_trap++;
        p = curproc;
 
        cnt.v_trap++;
        p = curproc;
@@ -434,8 +433,8 @@ copyfault:
                        return;
                }
                spl0();
                        return;
                }
                spl0();
-               if (p->p_flag & SOWEUPC) {
-                       p->p_flag &= ~SOWEUPC;
+               if (p->p_flag & P_OWEUPC) {
+                       p->p_flag &= ~P_OWEUPC;
                        ADDUPROF(p);
                }
                goto out;
                        ADDUPROF(p);
                }
                goto out;
@@ -876,7 +875,7 @@ syscall(code, frame)
        register caddr_t params;
        register struct sysent *callp;
        register struct proc *p;
        register caddr_t params;
        register struct sysent *callp;
        register struct proc *p;
-       int error, opc, numsys, s;
+       int error, opc, numsys;
        u_int argsize;
        struct args {
                int i[8];
        u_int argsize;
        struct args {
                int i[8];