diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/os_posix/os_sleep.c')
-rw-r--r-- | src/third_party/wiredtiger/src/os_posix/os_sleep.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/third_party/wiredtiger/src/os_posix/os_sleep.c b/src/third_party/wiredtiger/src/os_posix/os_sleep.c index c9676dcd585..1508755d504 100644 --- a/src/third_party/wiredtiger/src/os_posix/os_sleep.c +++ b/src/third_party/wiredtiger/src/os_posix/os_sleep.c @@ -10,24 +10,22 @@ /* * __wt_sleep -- - * Pause the thread of control. + * Pause the thread of control. */ void -__wt_sleep(uint64_t seconds, uint64_t micro_seconds) - WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) +__wt_sleep(uint64_t seconds, uint64_t micro_seconds) WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) { - struct timeval t; + struct timeval t; - /* - * Sleeping isn't documented as a memory barrier, and it's a reasonable - * expectation to have. There's no reason not to explicitly include a - * barrier since we're giving up the CPU, and ensures callers are never - * surprised. - */ - WT_FULL_BARRIER(); + /* + * Sleeping isn't documented as a memory barrier, and it's a reasonable expectation to have. + * There's no reason not to explicitly include a barrier since we're giving up the CPU, and + * ensures callers are never surprised. + */ + WT_FULL_BARRIER(); - t.tv_sec = (time_t)(seconds + micro_seconds / WT_MILLION); - t.tv_usec = (suseconds_t)(micro_seconds % WT_MILLION); + t.tv_sec = (time_t)(seconds + micro_seconds / WT_MILLION); + t.tv_usec = (suseconds_t)(micro_seconds % WT_MILLION); - (void)select(0, NULL, NULL, NULL, &t); + (void)select(0, NULL, NULL, NULL, &t); } |