Changeset 2d1fde3b in mainline
- Timestamp:
- 2006-05-28T22:26:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c042bdd
- Parents:
- 0b99e40
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/time.c
r0b99e40 r2d1fde3b 39 39 /* Pointers to public variables with time */ 40 40 struct { 41 volatile sysarg_t seconds ;41 volatile sysarg_t seconds1; 42 42 volatile sysarg_t useconds; 43 volatile sysarg_t useconds2;43 volatile sysarg_t seconds2; 44 44 } *ktime = NULL; 45 45 … … 58 58 { 59 59 void *mapping; 60 sysarg_t s econds,useconds;60 sysarg_t s1, s2; 61 61 sysarg_t t1; 62 62 int res; … … 79 79 tz->tz_dsttime = DST_NONE; 80 80 retry: 81 seconds = ktime->seconds; 82 read_barrier(); 81 s1 = ktime->seconds1; 83 82 tv->tv_usec = ktime->useconds; 84 83 read_barrier(); 85 tv->tv_sec = ktime->seconds; 86 if (tv->tv_usec == 0 && seconds == tv->tv_sec && 87 ktime->useconds2 != 0) { 88 read_barrier(); 89 goto retry; 90 } 91 92 if (seconds != tv->tv_sec) 93 tv->tv_usec = ktime->useconds; 84 s2 = ktime->seconds2; 85 if (s1 != s2) { 86 tv->tv_usec = 0; 87 tv->tv_sec = s1 > s2 ? s1 : s2; 88 } else 89 tv->tv_sec = s1; 94 90 95 91 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.