From c71d561bf86f898d6caca91a09062f0891deb565 Mon Sep 17 00:00:00 2001 From: Jake Freeland Date: Wed, 23 Aug 2023 22:39:54 -0600 Subject: [PATCH] timerfd: Move implementation from linux compat to cpukit/score/src Move the timerfd impelemntation from linux compat code to cpukit/score/src. Use it to implement the new system calls for timerfd. Add a hook to kern_tc to allow timerfd to know when the system time has stepped. Add kqueue support to timerfd. Adjust a few names to be less Linux centric. RelNotes: YES Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack) Differential Revision: https://reviews.freebsd.org/D38459 --- cpukit/score/src/kern_tc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 51747d0b8a..0fea77c92c 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -86,6 +86,9 @@ #include #endif /* __rtems__ */ #include +#ifndef __rtems__ +#include +#endif /* __rtems__ */ #include #include #include @@ -1585,6 +1588,7 @@ _Timecounter_Set_clock(const struct bintime *_bt, /* Avoid rtc_generation == 0, since td_rtcgen == 0 is special. */ atomic_add_rel_int(&rtc_generation, 2); + timerfd_jumped(); sleepq_chains_remove_matching(sleeping_on_old_rtc); if (timestepwarnings) { nanotime(&taft);