HomeFreeBSD

timerfd: Define a locking regime

Description

timerfd: Define a locking regime

Define a locking regime for the members of struct timerfd and document
it so future code can follow the standard. The lock legend can be found
in a comment above struct timerfd.

Additionally,
* Add assertions based on locking regime.
* Fill kn_data with the expiration count when EVFILT_READ is triggered.
* Report st_ctim for stat(2).
* Check if file has f_type == DTYPE_TIMERFD before assigning timerfd
  pointer to f_data.

MFC After: 3 days
Reviewed by: imp, kib, markj
Differential Revision: https://reviews.freebsd.org/D41600

Details

Provenance
jfreeAuthored on Sep 5 2023, 10:10 PM
impCommitted on Sep 5 2023, 10:24 PM
Reviewer
imp
Differential Revision
D41600: timerfd: Define a locking regime
Parents
rG3814249f1e8d: cxgbe(4): Avoid hang on kldunload on netlink enabled kernels.
Branches
Unknown
Tags
Unknown