@@ -1343,17 +1343,41 @@ INTERCEPTOR(int, inotify_rm_watch, int fd, int wd) {
1343
1343
__rtsan_notify_intercepted_call (" inotify_rm_watch" );
1344
1344
return REAL (inotify_rm_watch)(fd, wd);
1345
1345
}
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
+ }
1346
1362
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT INTERCEPT_FUNCTION (inotify_init)
1347
1363
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT1 INTERCEPT_FUNCTION (inotify_init1)
1348
1364
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_ADD_WATCH \
1349
1365
INTERCEPT_FUNCTION (inotify_add_watch)
1350
1366
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_RM_WATCH \
1351
1367
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)
1352
1373
#else
1353
1374
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT
1354
1375
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_INIT1
1355
1376
#define RTSAN_MAYBE_INTERCEPT_INOTIFY_ADD_WATCH
1356
1377
#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
1357
1381
#endif
1358
1382
1359
1383
INTERCEPTOR (int , pipe, int pipefd[2 ]) {
@@ -1617,6 +1641,10 @@ void __rtsan::InitializeInterceptors() {
1617
1641
RTSAN_MAYBE_INTERCEPT_INOTIFY_ADD_WATCH;
1618
1642
RTSAN_MAYBE_INTERCEPT_INOTIFY_RM_WATCH;
1619
1643
1644
+ RTSAN_MAYBE_INTERCEPT_TIMERFD_CREATE;
1645
+ RTSAN_MAYBE_INTERCEPT_TIMERFD_SETTIME;
1646
+ RTSAN_MAYBE_INTERCEPT_TIMERFD_GETTIME;
1647
+
1620
1648
INTERCEPT_FUNCTION (pipe);
1621
1649
INTERCEPT_FUNCTION (mkfifo);
1622
1650
0 commit comments