This patch avoid to block on a timer fd read. We already protect with poll(). --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/port.c b/port.c index 5803cd3..16434b5 100644 --- a/port.c +++ b/port.c @@ -1934,7 +1934,7 @@ int port_initialize(struct port *p) fd[i] = -1; } for (i = 0; i < N_TIMER_FDS; i++) { - fd[i] = timerfd_create(CLOCK_MONOTONIC, 0); + fd[i] = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); if (fd[i] < 0) { pr_err("timerfd_create: %s", strerror(errno)); goto no_timers; @@ -3459,7 +3459,7 @@ struct port *port_open(const char *phc_device, port_clear_fda(p, N_POLLFD); p->fault_fd = -1; if (!port_is_uds(p)) { - p->fault_fd = timerfd_create(CLOCK_MONOTONIC, 0); + p->fault_fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); if (p->fault_fd < 0) { pr_err("timerfd_create failed: %m"); goto err_tsproc; -- 2.41.0 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel