HomeFreeBSD

clock_gettime: Fix CLOCK_THREAD_CPUTIME_ID race

Description

clock_gettime: Fix CLOCK_THREAD_CPUTIME_ID race

Use a spinlock section instead of a critical section to synchronize with
statclock(). Otherwise the CLOCK_THREAD_CPUTIME_ID clock can appear to
go backwards.

PR: 262273
Reviewed by: markj

(cherry picked from commit 28d08dc7d051a4e058cc0004cf4dd884f87037a2)

Details

Provenance
firk_cantconnect.ruAuthored on Mar 15 2022, 10:22 PM
markjCommitted on Mar 24 2022, 2:28 PM
Parents
rG18a3bada308d: hdac: Handle interrupts racing with device suspend
Branches
Unknown
Tags
Unknown