summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-02-03 19:49:35 +0000
committerphk <phk@FreeBSD.org>2003-02-03 19:49:35 +0000
commit3692879cc82e12c56c011d2bf97d1c02bd3d66c5 (patch)
tree7251be2a86087b08495da120d84f24f25ed673c8 /sys/fs/nwfs
parentdb8a973d3ddfc686520b7766d7464f5140726cd9 (diff)
downloadFreeBSD-src-3692879cc82e12c56c011d2bf97d1c02bd3d66c5.zip
FreeBSD-src-3692879cc82e12c56c011d2bf97d1c02bd3d66c5.tar.gz
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
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/nwfs/nwfs_subr.c b/sys/fs/nwfs/nwfs_subr.c
index ad6009c..10d9647 100644
--- a/sys/fs/nwfs/nwfs_subr.c
+++ b/sys/fs/nwfs/nwfs_subr.c
@@ -596,7 +596,7 @@ ncp_unix2dostime(tsp, tzoff, ddp, dtp, dhp)
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
- t = tsp->tv_sec - tzoff * 60 - tz.tz_minuteswest * 60 -
+ t = tsp->tv_sec - tzoff * 60 - tz_minuteswest * 60 -
(wall_cmos_clock ? adjkerntz : 0);
t &= ~1;
if (lasttime != t) {
@@ -706,7 +706,7 @@ ncp_dos2unixtime(dd, dt, dh, tzoff, tsp)
days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1;
lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980;
}
- tsp->tv_sec = seconds + lastseconds + tz.tz_minuteswest * 60 +
+ tsp->tv_sec = seconds + lastseconds + tz_minuteswest * 60 +
tzoff * 60 + (wall_cmos_clock ? adjkerntz : 0);
tsp->tv_nsec = (dh % 100) * 10000000;
}
OpenPOWER on IntegriCloud