X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Finterrupt.c;h=a1ba5d8e2b0e18d3fc8517bc060bc80749ce8b7a;hb=343ef95fda9da33830d5ab6aabe5368c898f0918;hp=9071caeaa8de81087102d83ba14d9373f1f906ea;hpb=c3334d2307b721cfcea29e6abcd33e48487fb1ea;p=sbcl.git diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index 9071cae..a1ba5d8 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -124,32 +124,12 @@ struct interrupt_data * global_interrupt_data; * mask ought to be clear anyway most of the time, but may be non-zero * if we were interrupted e.g. while waiting for a queue. */ -#if 1 void reset_signal_mask () { sigset_t new; sigemptyset(&new); sigprocmask(SIG_SETMASK,&new,0); } -#else -void reset_signal_mask () -{ - sigset_t new,old; - int i; - int wrong=0; - sigemptyset(&new); - sigprocmask(SIG_SETMASK,&new,&old); - for(i=1; icode); #endif @@ -754,6 +734,16 @@ void thread_exit_handler(int num, siginfo_t *info, void *v_context) #endif +/* KLUDGE: Theoretically the approach we use for undefined alien + * variables should work for functions as well, but on PPC/Darwin + * we get bus error at bogus addresses instead, hence this workaround, + * that has the added benefit of automatically discriminating between + * functions and variables. + */ +void undefined_alien_function() { + funcall0(SymbolFunction(UNDEFINED_ALIEN_FUNCTION_ERROR)); +} + boolean handle_guard_page_triggered(os_context_t *context,void *addr){ struct thread *th=arch_os_get_current_thread(); @@ -785,7 +775,7 @@ boolean handle_guard_page_triggered(os_context_t *context,void *addr){ else if (addr >= undefined_alien_address && addr < undefined_alien_address + os_vm_page_size) { arrange_return_to_lisp_function - (context, SymbolFunction(UNDEFINED_ALIEN_ERROR)); + (context, SymbolFunction(UNDEFINED_ALIEN_VARIABLE_ERROR)); return 1; } else return 0;