diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-02-03 19:49:35 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-02-03 19:49:35 +0000 |
commit | 91f1c2b3cc65f0df743671cfc9d204e906a1e09b (patch) | |
tree | 7251be2a86087b08495da120d84f24f25ed673c8 /sys/pc98/cbus/pcrtc.c | |
parent | db5fb5c2b439e237686d9e013a13de73e35e6e94 (diff) | |
download | src-91f1c2b3cc65f0df743671cfc9d204e906a1e09b.tar.gz src-91f1c2b3cc65f0df743671cfc9d204e906a1e09b.zip |
Split the global timezone structure into two integer fields to
prevent the compiler from optimizing assignments into byte-copy
operations which might make access to the individual fields non-atomic.
Use the individual fields throughout, and don't bother locking them with
Giant: it is no longer needed.
Inspired by: tjr
Notes
Notes:
svn path=/head/; revision=110299
Diffstat (limited to 'sys/pc98/cbus/pcrtc.c')
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index 8e2dc97399f9..9a247a9068a2 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -1200,7 +1200,7 @@ inittodr(time_t base) in the local time zone */ #endif - sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); + sec += tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); y = time_second - sec; if (y <= -2 || y >= 2) { @@ -1241,7 +1241,7 @@ resettodr() /* Calculate local time to put in RTC */ - tm -= tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); + tm -= tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); rtc_outb(bin2bcd(tm%60)); tm /= 60; /* Write back Seconds */ rtc_outb(bin2bcd(tm%60)); tm /= 60; /* Write back Minutes */ @@ -1279,7 +1279,7 @@ resettodr() /* Calculate local time to put in RTC */ - tm -= tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); + tm -= tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0); writertc(RTC_SEC, bin2bcd(tm%60)); tm /= 60; /* Write back Seconds */ writertc(RTC_MIN, bin2bcd(tm%60)); tm /= 60; /* Write back Minutes */ |