HomeFreeBSD

Improve timeout precision of pthread_cond_timedwait().

Description

Improve timeout precision of pthread_cond_timedwait().

This code was not touched when all other user-space sleep functions were
switched to sbintime_t and decoupled from hardclock. When it is possible,
convert supplied times into sbinuptime to supply directly to msleep_sbt()
with C_ABSOLUTE. This provides the timeout resolution of few microseconds
instead of 2 milliseconds, plus avoids few clock reads and conversions.

Reviewed by: vangyzen
Differential Revision: https://reviews.freebsd.org/D34163

(cherry picked from commit 56070dd2e4df70e4de2a10c7ace684ceb8b0f0bd)

Details

Provenance
mavAuthored on Mar 4 2022, 3:03 AM
hselaskyCommitted on Nov 12 2022, 11:59 AM
Reviewer
vangyzen
Differential Revision
D34163: Improve timeout precision of pthread_cond_timedwait()
Parents
rG21f35c3699df: wg.4: Update the SPDX License Identifier
Branches
Unknown
Tags
Unknown