Page MenuHomeFreeBSD

timerfd_create: accept CLOCK_UPTIME/CLOCK_BOOTTIME
ClosedPublic

Authored by bapt on Mar 6 2024, 2:13 PM.
Tags
None
Referenced Files
F140538517: D44253.id135465.diff
Thu, Dec 25, 12:47 AM
Unknown Object (File)
Mon, Dec 1, 7:54 PM
Unknown Object (File)
Fri, Nov 28, 5:18 AM
Unknown Object (File)
Nov 25 2025, 3:13 AM
Unknown Object (File)
Nov 24 2025, 10:20 PM
Unknown Object (File)
Nov 23 2025, 11:16 AM
Unknown Object (File)
Nov 20 2025, 1:07 PM
Unknown Object (File)
Nov 13 2025, 3:00 AM

Details

Summary

This is a common use case when using timerfd_create to actually use
it with CLOCK_BOOTTIME on linux which is CLOCK_UPTIME for us.

Tested with the fnott notification software

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56481
Build 53369: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Mar 6 2024, 2:13 PM
des requested changes to this revision.Mar 6 2024, 3:32 PM
des added a subscriber: des.
des added inline comments.
sys/kern/sys_timerfd.c
436–445

either wrap this line or convert to a switch

This revision now requires changes to proceed.Mar 6 2024, 3:32 PM

convert to a switch
explicitly accept both CLOCK_UPTIME and CLOCK_BOOTTIME

bapt marked an inline comment as done.Mar 6 2024, 3:40 PM
This revision is now accepted and ready to land.Mar 6 2024, 3:59 PM
arichardson added inline comments.
sys/kern/sys_timerfd.c
438

These comments should not be needed for sequential case labels