aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/fast-jitter.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-06Update copyright dates with scripts/update-copyrightsJoseph Myers1-1/+1
2022-04-27sysdeps: Add 'get_fast_jitter' interace in fast-jitter.hNoah Goldstein1-0/+42
'get_fast_jitter' is meant to be used purely for performance purposes. In all cases it's used it should be acceptable to get no randomness (see default case). An example use case is in setting jitter for retries between threads at a lock. There is a performance benefit to having jitter, but only if the jitter can be generated very quickly and ultimately there is no serious issue if no jitter is generated. The implementation generally uses 'HP_TIMING_NOW' iff it is inlined (avoid any potential syscall paths). Reviewed-by: H.J. Lu <hjl.tools@gmail.com>