1.0.25.25: sig_stop_for_gc_handler looks at GC_INHIBIT first
authorGabor Melis <mega@hotpop.com>
Mon, 16 Feb 2009 21:39:08 +0000 (21:39 +0000)
committerGabor Melis <mega@hotpop.com>
Mon, 16 Feb 2009 21:39:08 +0000 (21:39 +0000)
... else we'd trap on every single pseudo atomic until gc is finally
allowed.

src/runtime/interrupt.c
version.lisp-expr

index 4860be2..405217f 100644 (file)
@@ -769,15 +769,16 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context)
     struct thread *thread=arch_os_get_current_thread();
     sigset_t ss;
 
-    if (arch_pseudo_atomic_atomic(context)) {
+    /* Test for GC_INHIBIT _first_, else we'd trap on every single
+     * pseudo atomic until gc is finally allowed. */
+    if (SymbolValue(GC_INHIBIT,thread) != NIL) {
         SetSymbolValue(STOP_FOR_GC_PENDING,T,thread);
-        arch_set_pseudo_atomic_interrupted(context);
-        FSHOW_SIGNAL((stderr, "sig_stop_for_gc deferred (PA)\n"));
+        FSHOW_SIGNAL((stderr, "sig_stop_for_gc deferred (*GC-INHIBIT*)\n"));
         return;
-    }
-    else if (SymbolValue(GC_INHIBIT,thread) != NIL) {
+    } else if (arch_pseudo_atomic_atomic(context)) {
         SetSymbolValue(STOP_FOR_GC_PENDING,T,thread);
-        FSHOW_SIGNAL((stderr, "sig_stop_for_gc deferred (*GC-INHIBIT*)\n"));
+        arch_set_pseudo_atomic_interrupted(context);
+        FSHOW_SIGNAL((stderr,"sig_stop_for_gc deferred (PA)\n"));
         return;
     }
 
index 36ac9e2..1629827 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.25.24"
+"1.0.25.25"