]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert atimer changes
authorYuuki Harano <masm+github@masm11.me>
Sat, 13 Nov 2021 07:02:46 +0000 (16:02 +0900)
committerYuuki Harano <masm+github@masm11.me>
Sat, 13 Nov 2021 07:02:46 +0000 (16:02 +0900)
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

index 197b504bf51f52c8c55e08511b374874911a8451..490c21bff16f93f200a074cf61b33686c541bc6b 100644 (file)
@@ -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