more-or-less working with new proc & user structs
[unix-history] / usr / src / sys / kern / kern_time.c
index a169790..e61955b 100644 (file)
@@ -4,11 +4,11 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)kern_time.c 7.14 (Berkeley) %G%
+ *     @(#)kern_time.c 7.15 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
-#include "user.h"
+#include "resourcevar.h"
 #include "kernel.h"
 #include "proc.h"
 
 #include "kernel.h"
 #include "proc.h"
 
@@ -60,7 +60,7 @@ settimeofday(p, uap, retval)
        struct timezone atz;
        int error, s;
 
        struct timezone atz;
        int error, s;
 
-       if (error = suser(u.u_cred, &u.u_acflag))
+       if (error = suser(p->p_ucred, &p->p_acflag))
                return (error);
        if (uap->tv) {
                if (error = copyin((caddr_t)uap->tv, (caddr_t)&atv,
                return (error);
        if (uap->tv) {
                if (error = copyin((caddr_t)uap->tv, (caddr_t)&atv,
@@ -95,7 +95,7 @@ adjtime(p, uap, retval)
        register long ndelta;
        int s, error;
 
        register long ndelta;
        int s, error;
 
-       if (error = suser(u.u_cred, &u.u_acflag))
+       if (error = suser(p->p_ucred, &p->p_acflag))
                return (error);
        if (error =
            copyin((caddr_t)uap->delta, (caddr_t)&atv, sizeof (struct timeval)))
                return (error);
        if (error =
            copyin((caddr_t)uap->delta, (caddr_t)&atv, sizeof (struct timeval)))
@@ -125,7 +125,7 @@ adjtime(p, uap, retval)
 
 /*
  * Get value of an interval timer.  The process virtual and
 
 /*
  * Get value of an interval timer.  The process virtual and
- * profiling virtual time timers are kept in the u. area, since
+ * profiling virtual time timers are kept in the p_stats area, since
  * they can be swapped out.  These are kept internally in the
  * way they are specified externally: in time until they expire.
  *
  * they can be swapped out.  These are kept internally in the
  * way they are specified externally: in time until they expire.
  *
@@ -173,7 +173,7 @@ getitimer(p, uap, retval)
                        else
                                timevalsub(&aitv.it_value, &time);
        } else
                        else
                                timevalsub(&aitv.it_value, &time);
        } else
-               aitv = u.u_timer[uap->which];
+               aitv = p->p_stats->p_timer[uap->which];
        splx(s);
        return (copyout((caddr_t)&aitv, (caddr_t)uap->itv,
            sizeof (struct itimerval)));
        splx(s);
        return (copyout((caddr_t)&aitv, (caddr_t)uap->itv,
            sizeof (struct itimerval)));
@@ -213,7 +213,7 @@ setitimer(p, uap, retval)
                }
                p->p_realtimer = aitv;
        } else
                }
                p->p_realtimer = aitv;
        } else
-               u.u_timer[uap->which] = aitv;
+               p->p_stats->p_timer[uap->which] = aitv;
        splx(s);
        return (0);
 }
        splx(s);
        return (0);
 }