# HG changeset patch # User Jan Dj¸«£rv # Date 1207723562 0 # Node ID 065fbf6b6fd05cd2d642c712d03af0f5220b42e9 # Parent ff99dcb2b31ba2cc620186767cf7159d4a59ad5f (alarm_signal_handler): Call run_timers if not SYNC_INPUT. Most of the code moved to run_timers. (do_pending_atimers): Call run_timers. (run_timers): New function. diff -r ff99dcb2b31b -r 065fbf6b6fd0 src/atimer.c --- a/src/atimer.c Wed Apr 09 06:15:13 2008 +0000 +++ b/src/atimer.c Wed Apr 09 06:46:02 2008 +0000 @@ -355,20 +355,12 @@ 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 @@ } +/* 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 @@ if (pending_atimers) { BLOCK_ATIMERS; - alarm_signal_handler (SIGALRM); + run_timers (); UNBLOCK_ATIMERS; } }