diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-09-07 13:04:39 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-09-07 16:35:31 +0200 |
commit | 81747ac6d3e846d1955edaa94dee9065e541b7d8 (patch) | |
tree | cdd1204ee830b18f57d96e2483cb9bb7190be5e1 /include/mach | |
parent | 2b4c03cbc84090174a3cf5d27887bac8fb052b57 (diff) |
kern: use proper memory fences when handling the mapped time
* include/mach/time_value.h (struct mapped_time_value): Adjust comment.
* kern/mach_clock.c (mtime): Likewise. Also make it volatile.
(update_mapped_time): Use full hardware barriers.
(read_mapped_time): New macro with proper fences.
(record_time_stamp, host_get_time): Use the new macro.
Diffstat (limited to 'include/mach')
-rw-r--r-- | include/mach/time_value.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mach/time_value.h b/include/mach/time_value.h index 61be581..0dfe382 100644 --- a/include/mach/time_value.h +++ b/include/mach/time_value.h @@ -84,7 +84,9 @@ typedef struct time_value time_value_t; * Read this mapped value with * do { * secs = mtime->seconds; + * __sync_synchronize(); * usecs = mtime->microseconds; + * __sync_synchronize(); * } while (secs != mtime->check_seconds); */ |