0.9.13.47: Thread safety miscellania
[sbcl.git] / src / runtime / x86-arch.c
index c3f9268..9a835fa 100644 (file)
@@ -23,7 +23,6 @@
 #include "interrupt.h"
 #include "interr.h"
 #include "breakpoint.h"
-#include "monitor.h"
 #include "thread.h"
 
 #include "genesis/static-symbols.h"
@@ -250,7 +249,7 @@ sigtrap_handler(int signal, siginfo_t *info, void *void_context)
        single-stepping (as far as I can tell) this is somewhat moot,
        but it might be worth either moving this code up or deleting
        the single-stepping code entirely.  -- CSR, 2002-07-15 */
-#ifdef LISP_FEATURE_LINUX
+#if defined(LISP_FEATURE_LINUX) || defined(RESTORE_FP_CONTROL_FROM_CONTEXT)
     os_restore_fp_control(context);
 #endif
 
@@ -317,6 +316,9 @@ static void
 sigill_handler(int signal, siginfo_t *siginfo, void *void_context) {
     os_context_t *context = (os_context_t*)void_context;
 
+    /* Triggering SIGTRAP using int3 is unreliable on OS X/x86, so
+     * we need to use illegal instructions for traps.
+     */
 #if defined(LISP_FEATURE_DARWIN)
     if (*((unsigned short *)*os_context_pc_addr(context)) == 0x0b0f) {
         *os_context_pc_addr(context) += 2;
@@ -325,7 +327,7 @@ sigill_handler(int signal, siginfo_t *siginfo, void *void_context) {
 #endif
 
     fake_foreign_function_call(context);
-    monitor_or_something();
+    lose("fake_foreign_call fell through");
 }
 
 void