summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltraceaccumulators.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-01-04 12:04:56 -0500
committerNat Goodspeed <nat@lindenlab.com>2023-01-04 12:04:56 -0500
commitaa112ef17f4fdfeecc05e5305af93a6d4b9fce70 (patch)
tree722b96368db611cb5a8c153d6d1165e2e76c8c2c /indra/llcommon/lltraceaccumulators.h
parentbb718155bddfbe7007029a0c9e69a4a98615f14d (diff)
DRTVWR-575: Fix bug in macOS micro_sleep().
The compiler was deducing an unsigned type for the difference (U64 desired microseconds - half KERNEL_SLEEP_INTERVAL_US). When the desired sleep was less than that constant, the difference went hugely positive, resulting in a very long snooze. Amusingly, forcing that U64 result into an S32 num_sleep_intervals worked only *because* of integer truncation: the high-order bits were discarded, resulting in a negative result as intended. Ensuring that both integer operands are signed at the outset, though, produces a more formally correct result.
Diffstat (limited to 'indra/llcommon/lltraceaccumulators.h')
0 files changed, 0 insertions, 0 deletions