@@ -1343,17 +1343,41 @@ INTERCEPTOR(int, inotify_rm_watch, int fd, int wd) {
13431343 __rtsan_notify_intercepted_call (" inotify_rm_watch" );
13441344 return REAL (inotify_rm_watch)(fd, wd);
13451345}
1346+
1347+ INTERCEPTOR (int , timerfd_create, int clockid, int flags) {
1348+ __rtsan_notify_intercepted_call (" timerfd_create" );
1349+ return REAL (timerfd_create)(clockid, flags);
1350+ }
1351+
1352+ INTERCEPTOR (int , timerfd_settime, int fd, int flags, const itimerspec *newval,
1353+ struct itimerspec *oldval) {
1354+ __rtsan_notify_intercepted_call (" timerfd_settime" );
1355+ return REAL (timerfd_settime)(fd, flags, newval, oldval);
1356+ }
1357+
1358+ INTERCEPTOR (int , timerfd_gettime, int fd, struct itimerspec *val) {
1359+ __rtsan_notify_intercepted_call (" timerfd_gettime" );
1360+ return REAL (timerfd_gettime)(fd, val);
1361+ }
13461362#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT INTERCEPT_FUNCTION (inotify_init)
13471363#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT1 INTERCEPT_FUNCTION (inotify_init1)
13481364#define RTSAN_MAYBE_INTERCEPT_INOTIFY_ADD_WATCH \
13491365 INTERCEPT_FUNCTION (inotify_add_watch)
13501366#define RTSAN_MAYBE_INTERCEPT_INOTIFY_RM_WATCH \
13511367 INTERCEPT_FUNCTION (inotify_rm_watch)
1368+ #define RTSAN_MAYBE_INTERCEPT_TIMERFD_CREATE INTERCEPT_FUNCTION (timerfd_create)
1369+ #define RTSAN_MAYBE_INTERCEPT_TIMERFD_SETTIME \
1370+ INTERCEPT_FUNCTION (timerfd_settime)
1371+ #define RTSAN_MAYBE_INTERCEPT_TIMERFD_GETTIME \
1372+ INTERCEPT_FUNCTION (timerfd_gettime)
13521373#else
13531374#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT
13541375#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT1
13551376#define RTSAN_MAYBE_INTERCEPT_INOTIFY_ADD_WATCH
13561377#define RTSAN_MAYBE_INTERCEPT_INOTIFY_RM_WATCH
1378+ #define RTSAN_MAYBE_INTERCEPT_TIMERFD_CREATE
1379+ #define RTSAN_MAYBE_INTERCEPT_TIMERFD_SETTIME
1380+ #define RTSAN_MAYBE_INTERCEPT_TIMERFD_GETTIME
13571381#endif
13581382
13591383INTERCEPTOR (int , pipe, int pipefd[2 ]) {
@@ -1617,6 +1641,10 @@ void __rtsan::InitializeInterceptors() {
16171641 RTSAN_MAYBE_INTERCEPT_INOTIFY_ADD_WATCH;
16181642 RTSAN_MAYBE_INTERCEPT_INOTIFY_RM_WATCH;
16191643
1644+ RTSAN_MAYBE_INTERCEPT_TIMERFD_CREATE;
1645+ RTSAN_MAYBE_INTERCEPT_TIMERFD_SETTIME;
1646+ RTSAN_MAYBE_INTERCEPT_TIMERFD_GETTIME;
1647+
16201648 INTERCEPT_FUNCTION (pipe);
16211649 INTERCEPT_FUNCTION (mkfifo);
16221650
0 commit comments