aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-16 14:43:55 -0700
committerPaul Eggert2012-09-16 14:43:55 -0700
commit0caaedb1c3c9c48980144e41d2a95329d39c399a (patch)
tree3e191e2b290e9adf91594be047c1f268cacde932 /src/eval.c
parent634b8cacd6cc0557c1963ad7409db247963046d2 (diff)
downloademacs-0caaedb1c3c9c48980144e41d2a95329d39c399a.tar.gz
emacs-0caaedb1c3c9c48980144e41d2a95329d39c399a.zip
Remove configure's --without-sync-input option.
When auditing signal-handling in preparation for cleaning it up, I found that SYNC_INPUT has race conditions and would be a real pain to fix. Since it's an undocumented and deprecated configure-time option, now seems like a good time to remove it. Also see <http://bugs.gnu.org/11080#16>. * configure.ac (SYNC_INPUT, BROKEN_SA_RESTART): Remove. * admin/CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove. * etc/TODO (Make SYNC_INPUT the default): Remove, as the code now behaves as if SYNC_INPUT is always true. * src/alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal) (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls. (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: (malloc_hysteresis): (check_depth) [XMALLOC_OVERRUN_CHECK]: (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED) (dont_register_blocks, bytes_used_when_reconsidered) (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc) (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc): [!SYSTEM_MALLOC && !SYNC_INPUT]: Remove. All uses removed. (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different implementation, one that depends on whether the new macro XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT is defined. * src/atimer.c (run_timers, handle_alarm_signal): * src/keyboard.c (pending_signal, poll_for_input_1, poll_for_input) (handle_async_input, process_pending_signals) (handle_input_available_signal, init_keyboard): * src/nsterm.m (ns_read_socket): * src/process.c (wait_reading_process_output): * src/regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK): * src/sysdep.c (emacs_sigaction_init) [SA_RESTART]: (emacs_write): * src/xterm.c (XTread_socket): Assume SYNC_INPUT. * src/conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef. * src/eval.c (handling_signal): Remove. All uses removed. * src/lisp.h (ELSE_PENDING_SIGNALS): Remove. All uses replaced with the SYNC_INPUT version. (reset_malloc_hooks, uninterrupt_malloc, handling_signal): Remove decls. * src/sysdep.c, src/syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Now static. Fixes: debbugs:12450
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/eval.c b/src/eval.c
index 6cca13a8fda..1c565e233c6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -117,12 +117,6 @@ static EMACS_INT when_entered_debugger;
117 117
118Lisp_Object Vsignaling_function; 118Lisp_Object Vsignaling_function;
119 119
120/* Set to non-zero while processing X events. Checked in Feval to
121 make sure the Lisp interpreter isn't called from a signal handler,
122 which is unsafe because the interpreter isn't reentrant. */
123
124int handling_signal;
125
126/* If non-nil, Lisp code must not be run since some part of Emacs is 120/* If non-nil, Lisp code must not be run since some part of Emacs is
127 in an inconsistent state. Currently, x-create-frame uses this to 121 in an inconsistent state. Currently, x-create-frame uses this to
128 avoid triggering window-configuration-change-hook while the new 122 avoid triggering window-configuration-change-hook while the new
@@ -1106,7 +1100,6 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value)
1106 /* Restore certain special C variables. */ 1100 /* Restore certain special C variables. */
1107 set_poll_suppress_count (catch->poll_suppress_count); 1101 set_poll_suppress_count (catch->poll_suppress_count);
1108 UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); 1102 UNBLOCK_INPUT_TO (catch->interrupt_input_blocked);
1109 handling_signal = 0;
1110 immediate_quit = 0; 1103 immediate_quit = 0;
1111 1104
1112 do 1105 do
@@ -1486,7 +1479,7 @@ See also the function `condition-case'. */)
1486 struct handler *h; 1479 struct handler *h;
1487 struct backtrace *bp; 1480 struct backtrace *bp;
1488 1481
1489 immediate_quit = handling_signal = 0; 1482 immediate_quit = 0;
1490 abort_on_gc = 0; 1483 abort_on_gc = 0;
1491 if (gc_in_progress || waiting_for_input) 1484 if (gc_in_progress || waiting_for_input)
1492 emacs_abort (); 1485 emacs_abort ();
@@ -2039,9 +2032,6 @@ eval_sub (Lisp_Object form)
2039 struct backtrace backtrace; 2032 struct backtrace backtrace;
2040 struct gcpro gcpro1, gcpro2, gcpro3; 2033 struct gcpro gcpro1, gcpro2, gcpro3;
2041 2034
2042 if (handling_signal)
2043 emacs_abort ();
2044
2045 if (SYMBOLP (form)) 2035 if (SYMBOLP (form))
2046 { 2036 {
2047 /* Look up its binding in the lexical environment. 2037 /* Look up its binding in the lexical environment.
@@ -3104,8 +3094,6 @@ specbind (Lisp_Object symbol, Lisp_Object value)
3104{ 3094{
3105 struct Lisp_Symbol *sym; 3095 struct Lisp_Symbol *sym;
3106 3096
3107 eassert (!handling_signal);
3108
3109 CHECK_SYMBOL (symbol); 3097 CHECK_SYMBOL (symbol);
3110 sym = XSYMBOL (symbol); 3098 sym = XSYMBOL (symbol);
3111 if (specpdl_ptr == specpdl + specpdl_size) 3099 if (specpdl_ptr == specpdl + specpdl_size)
@@ -3199,8 +3187,6 @@ specbind (Lisp_Object symbol, Lisp_Object value)
3199void 3187void
3200record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) 3188record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg)
3201{ 3189{
3202 eassert (!handling_signal);
3203
3204 if (specpdl_ptr == specpdl + specpdl_size) 3190 if (specpdl_ptr == specpdl + specpdl_size)
3205 grow_specpdl (); 3191 grow_specpdl ();
3206 specpdl_ptr->func = function; 3192 specpdl_ptr->func = function;