1.0.28.65: fix compiling with *PROFILE-HASH-CACHE* set to T
[sbcl.git] / src / runtime / cheneygc.c
index 4253892..62bd6de 100644 (file)
@@ -132,9 +132,7 @@ collect_garbage(generation_index_t ignore)
 
     /* it's possible that signals are blocked already if this was called
      * from a signal handler (e.g. with the sigsegv gc_trigger stuff) */
-    sigemptyset(&tmp);
-    sigaddset_blockable(&tmp);
-    thread_sigmask(SIG_BLOCK, &tmp, &old);
+    block_blockable_signals(0, &old);
 
     current_static_space_free_pointer =
         (lispobj *) ((unsigned long)
@@ -597,7 +595,7 @@ void set_auto_gc_trigger(os_vm_size_t dynamic_usage)
         lose("set_auto_gc_trigger: tried to set gc trigger too high! (0x%08lx)\n",
              (unsigned long)dynamic_usage);
 
-#if defined(SUNOS) || defined(SOLARIS)
+#if defined(SUNOS) || defined(SOLARIS) || defined(LISP_FEATURE_HPUX)
     os_invalidate(addr, length);
 #else
     os_protect(addr, length, 0);
@@ -617,7 +615,7 @@ void clear_auto_gc_trigger(void)
     addr = (os_vm_address_t)current_auto_gc_trigger;
     length = dynamic_space_size + (os_vm_address_t)current_dynamic_space - addr;
 
-#if defined(SUNOS) || defined(SOLARIS)
+#if defined(SUNOS) || defined(SOLARIS) || defined(LISP_FEATURE_HPUX)
     /* don't want to force whole space into swapping mode... */
     os_validate(addr, length);
 #else
@@ -654,6 +652,8 @@ cheneygc_handle_wp_violation(os_context_t *context, void *addr)
                      * the PA section */
                     SetSymbolValue(GC_PENDING,T,thread);
                     arch_set_pseudo_atomic_interrupted(context);
+                    maybe_save_gc_mask_and_block_deferrables
+                        (os_context_sigmask_addr(context));
                 } else {
                     maybe_gc(context);
                 }