diff options
author | qiao <none@none> | 2007-02-13 14:18:11 -0800 |
---|---|---|
committer | qiao <none@none> | 2007-02-13 14:18:11 -0800 |
commit | a913396d8daab34d2fa497f49ae18d9f3d3a059f (patch) | |
tree | 6893eeca3cc8f450567f222c9b1db33dc6e6d61a /usr/src/uts/common/os/clock.c | |
parent | 3125ebfc35130d243e775dc38a6a59be4df0b137 (diff) | |
download | illumos-gate-a913396d8daab34d2fa497f49ae18d9f3d3a059f.tar.gz |
6265036 cv_waituntil_sig() often returns early
Diffstat (limited to 'usr/src/uts/common/os/clock.c')
-rw-r--r-- | usr/src/uts/common/os/clock.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/src/uts/common/os/clock.c b/usr/src/uts/common/os/clock.c index 4eff816e48..0a8a99f0af 100644 --- a/usr/src/uts/common/os/clock.c +++ b/usr/src/uts/common/os/clock.c @@ -856,7 +856,7 @@ clock(void) hrestime = tod; membar_enter(); /* hrestime visible */ timedelta = 0; - timechanged++; + hrestime_isvalid = 1; tod_needsync = 0; hr_clock_unlock(s); } @@ -1787,16 +1787,20 @@ clkset(time_t approx) mutex_exit(&tod_lock); } -int timechanged; /* for testing if the system time has been reset */ +int hrestime_isvalid = 0; void set_hrestime(timestruc_t *ts) { int spl = hr_clock_lock(); hrestime = *ts; - membar_enter(); /* hrestime must be visible before timechanged++ */ + /* + * hrestime must be visible before hrestime_isvalid + * is set to 1 + */ + membar_enter(); timedelta = 0; - timechanged++; + hrestime_isvalid = 1; hr_clock_unlock(spl); } |