]> git.eshelyaron.com Git - emacs.git/commitdiff
(alarm_signal_handler): Call run_timers if not SYNC_INPUT.
authorJan Djärv <jan.h.d@swipnet.se>
Wed, 9 Apr 2008 06:46:02 +0000 (06:46 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Wed, 9 Apr 2008 06:46:02 +0000 (06:46 +0000)
Most of the code moved to run_timers.
(do_pending_atimers): Call run_timers.
(run_timers): New function.

src/atimer.c

index f5f5f34f16a8e26e2570f918109bf0f159a8acad..fc7aeb010101e99494256aefcb8a032c6ccd7fe9 100644 (file)
@@ -355,20 +355,12 @@ schedule_atimer (t)
   t->next = a;
 }
 
-
-/* Signal handler for SIGALRM.  SIGNO is the signal number, i.e.
-   SIGALRM.  */
-
-SIGTYPE
-alarm_signal_handler (signo)
-     int signo;
+static void
+run_timers ()
 {
   EMACS_TIME now;
 
-  SIGNAL_THREAD_CHECK (signo);
-
   EMACS_GET_TIME (now);
-  pending_atimers = 0;
 
   while (atimers
         && (pending_atimers = interrupt_input_blocked) == 0
@@ -405,6 +397,20 @@ alarm_signal_handler (signo)
 }
 
 
+/* Signal handler for SIGALRM.  SIGNO is the signal number, i.e.
+   SIGALRM.  */
+
+SIGTYPE
+alarm_signal_handler (signo)
+     int signo;
+{
+  pending_atimers = 1;
+#ifndef SYNC_INPUT
+  run_timers ();
+#endif
+}
+
+
 /* Call alarm_signal_handler for pending timers.  */
 
 void
@@ -413,7 +419,7 @@ do_pending_atimers ()
   if (pending_atimers)
     {
       BLOCK_ATIMERS;
-      alarm_signal_handler (SIGALRM);
+      run_timers ();
       UNBLOCK_ATIMERS;
     }
 }