From: Thiemo Seufer Date: Mon, 12 Sep 2005 09:44:22 +0000 (+0000) Subject: 0.9.4.63: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=95a16da7b157c351538d7f83e515843e11fb28b5;p=sbcl.git 0.9.4.63: Improve signal handling performance a bit by using sigfillset, removing redundant check_blockables_blocked_or_lose calls, and copying pre-initialized sigset_t where possible. --- diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index 6601a95..7e4fa03 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -160,8 +160,7 @@ void reset_signal_mask () void block_blockable_signals () { sigset_t block; - sigemptyset(&block); - sigaddset_blockable(&block); + sigcopyset(&block, &blockable_sigset); thread_sigmask(SIG_BLOCK, &block, 0); } @@ -301,33 +300,31 @@ interrupt_internal_error(int signal, siginfo_t *info, os_context_t *context, { lispobj context_sap = 0; - check_blockables_blocked_or_lose(); fake_foreign_function_call(context); + if (!internal_errors_enabled) { + describe_internal_error(context); + /* There's no good way to recover from an internal error + * before the Lisp error handling mechanism is set up. */ + lose("internal error too early in init, can't recover"); + } + /* Allocate the SAP object while the interrupts are still * disabled. */ - if (internal_errors_enabled) { - context_sap = alloc_sap(context); - } + context_sap = alloc_sap(context); thread_sigmask(SIG_SETMASK, os_context_sigmask_addr(context), 0); - if (internal_errors_enabled) { - SHOW("in interrupt_internal_error"); + SHOW("in interrupt_internal_error"); #ifdef QSHOW - /* Display some rudimentary debugging information about the - * error, so that even if the Lisp error handler gets badly - * confused, we have a chance to determine what's going on. */ - describe_internal_error(context); + /* Display some rudimentary debugging information about the + * error, so that even if the Lisp error handler gets badly + * confused, we have a chance to determine what's going on. */ + describe_internal_error(context); #endif - funcall2(SymbolFunction(INTERNAL_ERROR), context_sap, - continuable ? T : NIL); - } else { - describe_internal_error(context); - /* There's no good way to recover from an internal error - * before the Lisp error handling mechanism is set up. */ - lose("internal error too early in init, can't recover"); - } + funcall2(SymbolFunction(INTERNAL_ERROR), context_sap, + continuable ? T : NIL); + undo_fake_foreign_function_call(context); /* blocks signals again */ if (continuable) { arch_skip_instruction(context); @@ -678,8 +675,7 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context) /* need the context stored so it can have registers scavenged */ fake_foreign_function_call(context); - sigemptyset(&ss); - for(i=1;i