BSD 4_3 release
[unix-history] / usr / src / sys / sys / kern_xxx.c
index ee6fd32..8a428f2 100644 (file)
@@ -1,12 +1,18 @@
-/*     kern_xxx.c      6.1     83/07/29        */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)kern_xxx.c  7.1 (Berkeley) 6/5/86
+ */
 
 
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/kernel.h"
-#include "../h/proc.h"
-#include "../h/reboot.h"
+#include "param.h"
+#include "systm.h"
+#include "dir.h"
+#include "user.h"
+#include "kernel.h"
+#include "proc.h"
+#include "reboot.h"
 
 gethostid()
 {
 
 gethostid()
 {
@@ -17,7 +23,7 @@ gethostid()
 sethostid()
 {
        struct a {
 sethostid()
 {
        struct a {
-               int     hostid;
+               long    hostid;
        } *uap = (struct a *)u.u_ap;
 
        if (suser())
        } *uap = (struct a *)u.u_ap;
 
        if (suser())
@@ -28,7 +34,7 @@ gethostname()
 {
        register struct a {
                char    *hostname;
 {
        register struct a {
                char    *hostname;
-               int     len;
+               u_int   len;
        } *uap = (struct a *)u.u_ap;
        register u_int len;
 
        } *uap = (struct a *)u.u_ap;
        register u_int len;
 
@@ -174,12 +180,13 @@ oftime()
                struct  timeb   *tp;
        } *uap;
        struct timeb tb;
                struct  timeb   *tp;
        } *uap;
        struct timeb tb;
+       int s;
 
        uap = (struct a *)u.u_ap;
 
        uap = (struct a *)u.u_ap;
-       (void) spl7();
+       s = splhigh();
        tb.time = time.tv_sec;
        tb.millitm = time.tv_usec / 1000;
        tb.time = time.tv_sec;
        tb.millitm = time.tv_usec / 1000;
-       (void) spl0();
+       splx(s);
        tb.timezone = tz.tz_minuteswest;
        tb.dstflag = tz.tz_dsttime;
        u.u_error = copyout((caddr_t)&tb, (caddr_t)uap->tp, sizeof (tb));
        tb.timezone = tz.tz_minuteswest;
        tb.dstflag = tz.tz_dsttime;
        u.u_error = copyout((caddr_t)&tb, (caddr_t)uap->tp, sizeof (tb));
@@ -191,7 +198,7 @@ oalarm()
                int     deltat;
        } *uap = (struct a *)u.u_ap;
        register struct proc *p = u.u_procp;
                int     deltat;
        } *uap = (struct a *)u.u_ap;
        register struct proc *p = u.u_procp;
-       int s = spl7();
+       int s = splhigh();
 
        untimeout(realitexpire, (caddr_t)p);
        timerclear(&p->p_realtimer.it_interval);
 
        untimeout(realitexpire, (caddr_t)p);
        timerclear(&p->p_realtimer.it_interval);
@@ -341,7 +348,7 @@ ossig()
                return;
        }
        sv->sv_mask = 0;
                return;
        }
        sv->sv_mask = 0;
-       sv->sv_onstack = 0;
+       sv->sv_flags = SV_INTERRUPT;
        u.u_r.r_val1 = (int)u.u_signal[a];
        setsigvec(a, sv);
        p->p_flag |= SOUSIG;            /* mark as simulating old stuff */
        u.u_r.r_val1 = (int)u.u_signal[a];
        setsigvec(a, sv);
        p->p_flag |= SOUSIG;            /* mark as simulating old stuff */