/* Asynchronous timers.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Boston, MA 02111-1307, USA. */
#include <config.h>
-#include <lisp.h>
#include <signal.h>
+#include <stdio.h>
+#include <lisp.h>
#include <syssignal.h>
#include <systime.h>
#include <blockinput.h>
#include <atimer.h>
-#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
{
EMACS_TIME now;
+ SIGNAL_THREAD_CHECK (signo);
+
EMACS_GET_TIME (now);
pending_atimers = 0;
t = atimers;
atimers = atimers->next;
+#ifndef MAC_OSX
t->fn (t);
+#endif
if (t->type == ATIMER_CONTINUOUS)
{
t->next = free_atimers;
free_atimers = t;
}
+#ifdef MAC_OSX
+ /* Fix for Ctrl-G. Perhaps this should apply to all platforms. */
+ t->fn (t);
+#endif
EMACS_GET_TIME (now);
}
- set_alarm ();
+ if (! pending_atimers)
+ set_alarm ();
}
pending_atimers = 0;
signal (SIGALRM, alarm_signal_handler);
}
+
+/* arch-tag: e6308261-eec6-404b-89fb-6e5909518d70
+ (do not change this comment) */