From: Yuuki Harano Date: Sat, 13 Nov 2021 07:02:46 +0000 (+0900) Subject: Revert atimer changes X-Git-Tag: emacs-29.0.90~3669 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c3377ae3b7fdb8714e03586589d1b2804cf08e17;p=emacs.git 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 --- 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