diff options
author | bde <bde@FreeBSD.org> | 1997-03-22 08:03:51 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-03-22 08:03:51 +0000 |
commit | 60e14681284303aa19c383bd113f78d75db543e8 (patch) | |
tree | c345eb5285f5bdf8c5e18f1840eace99d6cf9b02 /sys/kern/kern_time.c | |
parent | 0bc178170104cff1e818e849d08a50c6a4ee0851 (diff) | |
download | FreeBSD-src-60e14681284303aa19c383bd113f78d75db543e8.zip FreeBSD-src-60e14681284303aa19c383bd113f78d75db543e8.tar.gz |
Removed `volatile' from declaration of `time', and removed the resulting
null casts. `time' is nonvolatile for accesses within a region locked
by splclock()/splx(). Accesses outside such a region are invalid, and
splx() must have the side effect of potentially changing all global
variables (since there are hundreds of sort of volatile variables like
`time'), so declaring `time' as volatile didn't have any real benefits.
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 4a0db6a..797ea2c 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: kern_time.c,v 1.21 1997/02/22 09:39:13 peter Exp $ */ #include <sys/param.h> @@ -267,8 +267,7 @@ getitimer(p, uap, retval) if (timercmp(&aitv.it_value, &time, <)) timerclear(&aitv.it_value); else - timevalsub(&aitv.it_value, - (struct timeval *)&time); + timevalsub(&aitv.it_value, &time); } else aitv = p->p_stats->p_timer[uap->which]; splx(s); @@ -310,7 +309,7 @@ setitimer(p, uap, retval) if (uap->which == ITIMER_REAL) { untimeout(realitexpire, (caddr_t)p); if (timerisset(&aitv.it_value)) { - timevaladd(&aitv.it_value, (struct timeval *)&time); + timevaladd(&aitv.it_value, &time); timeout(realitexpire, (caddr_t)p, hzto(&aitv.it_value)); } p->p_realtimer = aitv; |