to avoid similar races.
* keyboard.c (pending_signals): Now bool, not int.
+2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * profiler.c (handle_profiler_signal): Inhibit pending signals too,
+ to avoid similar races.
+ * keyboard.c (pending_signals): Now bool, not int.
+
2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
* profiler.c (handle_profiler_signal): Fix a malloc race
/* Positive if interrupt input is blocked right now. */
volatile int interrupt_input_blocked;
-/* Nonzero means an input interrupt or alarm signal has arrived.
+/* True means an input interrupt or alarm signal has arrived.
The QUIT macro checks this. */
-volatile int pending_signals;
+volatile bool pending_signals;
#define KBD_BUFFER_SIZE 4096
a request to exit Emacs when it is safe to do. */
extern void process_pending_signals (void);
-extern int volatile pending_signals;
+extern bool volatile pending_signals;
extern void process_quit_flag (void);
#define QUIT \
else
{
Lisp_Object oquit;
+ bool saved_pending_signals;
EMACS_INT count = 1;
#ifdef HAVE_ITIMERSPEC
if (profiler_timer_ok)
uses QUIT, which can call malloc, which can cause disaster in
a signal handler. So inhibit QUIT. */
oquit = Vinhibit_quit;
+ saved_pending_signals = pending_signals;
Vinhibit_quit = Qt;
+ pending_signals = 0;
eassert (HASH_TABLE_P (cpu_log));
record_backtrace (XHASH_TABLE (cpu_log), count);
Vinhibit_quit = oquit;
+ pending_signals = saved_pending_signals;
}
}