From 3692879cc82e12c56c011d2bf97d1c02bd3d66c5 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 3 Feb 2003 19:49:35 +0000 Subject: 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 --- sys/amd64/amd64/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/amd64/amd64/tsc.c') diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 8e812a1..ec9b23a 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -908,7 +908,7 @@ inittodr(time_t base) /* sec now contains the number of seconds, since Jan 1 1970, in the local time zone */ - 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) { @@ -946,7 +946,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 */ -- cgit v1.1