HomeFreeBSD

pps: Simplify capture and event processing

Description

pps: Simplify capture and event processing

Use local variables for the captured timehand and timecounter in pps_event().
This fixes a potential issue in the nsec preparation for hardpps(). Here the
timecounter was accessed through the captured timehand after the generation was
checked.

Make a snapshot of the relevent timehand values early in pps_event(). Check
the timehand generation only once during the capture and event processing. Use
atomic_thread_fence_acq() similar to the other readers.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/604

Details

Provenance
sebastian.huber_embedded-brains.deAuthored on Feb 27 2023, 9:49 PM
impCommitted on Feb 27 2023, 10:10 PM
Parents
rGcb2a028b152b: pps: Load timecounter once in pps_capture()
Branches
Unknown
Tags
Unknown