Port safepoints to FreeBSD/x86
[sbcl.git] / src / runtime / bsd-os.c
index eeaf755..c2829b3 100644 (file)
@@ -213,6 +213,10 @@ memory_fault_handler(int signal, siginfo_t *siginfo, os_context_t *context)
 
     FSHOW((stderr, "Memory fault at: %p, PC: %p\n", fault_addr, *os_context_pc_addr(context)));
 
+#ifdef LISP_FEATURE_SB_SAFEPOINT
+    if (!handle_safepoint_violation(context, fault_addr))
+#endif
+
     if (!gencgc_handle_wp_violation(fault_addr))
         if(!handle_guard_page_triggered(context,fault_addr))
             lisp_memory_fault_error(context, fault_addr);
@@ -241,9 +245,15 @@ os_install_interrupt_handlers(void)
                                                  memory_fault_handler);
 #endif
 
-#ifdef THREADS_USING_GCSIGNAL
+#ifdef LISP_FEATURE_SB_THREAD
+# ifdef LISP_FEATURE_SB_SAFEPOINT
+#  ifdef LISP_FEATURE_SB_THRUPTION
+    undoably_install_low_level_interrupt_handler(SIGPIPE, thruption_handler);
+#  endif
+# else
     undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
                                                  sig_stop_for_gc_handler);
+# endif
 #endif
     SHOW("leaving os_install_interrupt_handlers()");
 }