1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-02 11:10:41 -07:00

(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.
This commit is contained in:
Jan Djärv 2008-04-09 06:46:02 +00:00
parent 799224fe61
commit 170c80bed4

View 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;
}
}