From c3377ae3b7fdb8714e03586589d1b2804cf08e17 Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Sat, 13 Nov 2021 16:02:46 +0900 Subject: [PATCH] Revert atimer changes They seem to be not needed any more. * src/atimer.c (set_alarm): Revert (turn_on_atimers): Revert (have_buggy_timerfd): Revert --- src/atimer.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/atimer.c b/src/atimer.c index 197b504bf51..490c21bff16 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -310,13 +310,10 @@ set_alarm (void) ispec.it_value = atimers->expiration; ispec.it_interval.tv_sec = ispec.it_interval.tv_nsec = 0; # ifdef HAVE_TIMERFD - if (timerfd >= 0) + if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0) { - if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0) - { - add_timer_wait_descriptor (timerfd); - exit = true; - } + add_timer_wait_descriptor (timerfd); + exit = true; } # endif if (alarm_timer_ok @@ -467,8 +464,7 @@ turn_on_atimers (bool on) if (alarm_timer_ok) timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0); # ifdef HAVE_TIMERFD - if (timerfd >= 0) - timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0); + timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0); # endif #endif alarm (0); @@ -575,9 +571,6 @@ have_buggy_timerfd (void) # ifdef CYGWIN struct utsname name; return uname (&name) < 0 || strverscmp (name.release, "3.0.2") < 0; -# elif defined HAVE_PGTK - /* pgtk emacs does not want timerfd. */ - return true; # else return false; # endif -- 2.39.5