]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: time: change the global timeval and the the global tick at once
authorWilly Tarreau <w@1wt.eu>
Sun, 11 Apr 2021 13:34:25 +0000 (15:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Apr 2021 21:47:54 +0000 (23:47 +0200)
commit7e4a557f64544876b185705c29529939d00fffbb
tree7c940033adf1e3fd28df18c3c657dd2f98ad2cf1
parent70cb3026a8d76e7b9c32ce95c4e9b5f21f3e44da
MINOR: time: change the global timeval and the the global tick at once

Instead of using two CAS loops, better compute the two units
simultaneously and update them at once. There is no guarantee that
the update will be synchronous, but we don't care, what matters is
that both are monotonically updated and that global_now_ms always
follows the last known value of global_now.
src/time.c