X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fbsd-os.c;h=3d06aa38a6cc1c27c7c2dc241af0fa7d7db27ee3;hb=78c7dbe937e6783e8da6f7a39c3eba87294d197c;hp=a364d5a0b0ef5f69e5d441df7961b8b17e559da2;hpb=c2ac5ba3964165ee2d21ccd4c6bf8bdc48e1a165;p=sbcl.git diff --git a/src/runtime/bsd-os.c b/src/runtime/bsd-os.c index a364d5a..3d06aa3 100644 --- a/src/runtime/bsd-os.c +++ b/src/runtime/bsd-os.c @@ -222,10 +222,20 @@ memory_fault_handler(int signal, siginfo_t *siginfo, void *void_context #ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK lisp_memory_fault_error(context, fault_addr); #else + + /* this disabled section is what used to be here: */ +#if 0 + /* FIXME: never returns 0 */ if (!maybe_gc(context)) { interrupt_handle_now(signal, siginfo, context); } #endif + /* FIXME: Nowadays, maybe_gc does return 1 to indicate + * that GC did happen, but I'm keeping the code as it + * was. */ + maybe_gc(context); + interrupt_handle_now(signal, siginfo, context); +#endif } } @@ -252,14 +262,8 @@ os_install_interrupt_handlers(void) #endif #ifdef LISP_FEATURE_SB_THREAD - undoably_install_low_level_interrupt_handler(SIG_INTERRUPT_THREAD, - interrupt_thread_handler); undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC, sig_stop_for_gc_handler); -#ifdef SIG_RESUME_FROM_GC - undoably_install_low_level_interrupt_handler(SIG_RESUME_FROM_GC, - sig_stop_for_gc_handler); -#endif #endif SHOW("leaving os_install_interrupt_handlers()"); } @@ -410,7 +414,6 @@ futex_wait(int *lock_word, long oldval, long sec, unsigned long usec) struct timespec timeout; int ret; -again: if (sec < 0) ret = umtx_wait((void *)lock_word, oldval, NULL); else { @@ -425,8 +428,7 @@ again: case ETIMEDOUT: return 1; case EINTR: - /* spurious wakeup from interrupt */ - goto again; + return 2; default: /* EWOULDBLOCK and others, need to check the lock */ return -1;