X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Finterrupt.c;h=48bec248805ec4dc120b64c3cba736b70aa97fc7;hb=638197e01ef6d5365852758c072b2b102fdceaa6;hp=45cd2fda5d9f528b4c4ce9cd3694593270d0f15e;hpb=402958f92506b9d3de852601b8c1ccb99b5ee558;p=sbcl.git diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index 45cd2fd..48bec24 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -59,7 +59,6 @@ #include "globals.h" #include "lispregs.h" #include "validate.h" -#include "monitor.h" #include "gc.h" #include "alloc.h" #include "dynbind.h" @@ -187,6 +186,14 @@ block_blockable_signals(void) #endif } +void +block_deferrable_signals(void) +{ +#ifndef LISP_FEATURE_WIN32 + thread_sigmask(SIG_BLOCK, &deferrable_sigset, 0); +#endif +} + /* * utility routines used by various signal handlers @@ -815,7 +822,7 @@ gc_trigger_hit(int signal, siginfo_t *info, os_context_t *context) else{ void *badaddr=arch_get_bad_addr(signal,info,context); return (badaddr >= (void *)current_auto_gc_trigger && - badaddr <((void *)current_dynamic_space + DYNAMIC_SPACE_SIZE)); + badaddr <((void *)current_dynamic_space + dynamic_space_size)); } } #endif @@ -1190,7 +1197,7 @@ sigaction_nodefer_test_handler(int signal, siginfo_t *info, void *void_context) sigset_t empty, current; int i; sigemptyset(&empty); - sigprocmask(SIG_BLOCK, &empty, ¤t); + thread_sigmask(SIG_BLOCK, &empty, ¤t); /* There should be exactly two blocked signals: the two we added * to sa_mask when setting up the handler. NetBSD doesn't block * the signal we're handling when SA_NODEFER is set; Linux before @@ -1221,7 +1228,7 @@ see_if_sigaction_nodefer_works() { sigset_t empty; sigemptyset(&empty); - sigprocmask(SIG_SETMASK, &empty, 0); + thread_sigmask(SIG_SETMASK, &empty, 0); } kill(getpid(), SA_NODEFER_TEST_KILL_SIGNAL); while (sigaction_nodefer_works == -1); @@ -1377,3 +1384,11 @@ interrupt_init() SHOW("returning from interrupt_init()"); #endif } + +#ifndef LISP_FEATURE_WIN32 +int +siginfo_code(siginfo_t *info) +{ + return info->si_code; +} +#endif