Regression from 1.0.25.37.
Store the context of allocation trap in interrupt_data and frob that
when gencgc wants to block deferrables.
Also: remove unused, buggy get_interrupt_context_for_thread.
if (SymbolValue(GC_INHIBIT,thread) == NIL) {
set_pseudo_atomic_interrupted(thread);
#ifdef LISP_FEATURE_PPC
- /* PPC calls alloc() from a trap, look up the most
- * recent one and frob that. */
- maybe_save_gc_mask_and_block_deferrables
- (get_interrupt_context_for_thread(thread));
+ /* PPC calls alloc() from a trap or from pa_alloc(),
+ * look up the most context if it's from a trap. */
+ {
+ os_context_t *context =
+ thread->interrupt_data->allocation_trap_context;
+ maybe_save_gc_mask_and_block_deferrables
+ (context ? os_context_sigmask_addr(context) : NULL);
+ }
#else
maybe_save_gc_mask_and_block_deferrables(NULL);
#endif
* NIL. Both deferrable interrupt handlers and gc are careful not
* to clobber each other's pending_mask. */
boolean gc_blocked_deferrables;
+#ifdef LISP_FEATURE_PPC
+ /* On PPC when consing wants to turn to alloc(), it does so via a
+ * trap. When alloc() wants to save the sigmask it consults
+ * allocation_trap_context. It does not look up the most recent
+ * context, because alloc() can be called from other places
+ * too. */
+ os_context_t *allocation_trap_context;
+#endif
};
extern boolean interrupt_handler_pending_p(void);
#include "globals.h"
#include "validate.h"
#include "os.h"
+#include "interrupt.h"
#include "lispregs.h"
#include "signal.h"
#include "interrupt.h"
dynamic_space_free_pointer);
#endif
- memory = (char *) alloc(size);
+ {
+ struct interrupt_data *data =
+ arch_os_get_current_thread()->interrupt_data;
+ data->allocation_trap_context = context;
+ memory = (char *) alloc(size);
+ data->allocation_trap_context = 0;
+ }
#if 0
fprintf(stderr, "alloc returned %p\n", memory);
}
th->interrupt_data->pending_handler = 0;
th->interrupt_data->gc_blocked_deferrables = 0;
+#ifdef LISP_FEATURE_PPC
+ th->interrupt_data->allocation_trap_context = 0;
+#endif
th->no_tls_value_marker=initial_function;
th->stepping = NIL;
return ((struct fdefn *)native_pointer(SymbolValue(sym, 0)))->fun;
}
-static inline
-os_context_t *get_interrupt_context_for_thread(struct thread *th)
-{
- return th->interrupt_contexts
- [fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,th)-1)];
-}
-
#if defined(LISP_FEATURE_SB_THREAD) && defined(LISP_FEATURE_GCC_TLS)
extern __thread struct thread *current_thread;
#endif
;;; 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.26.15"
+"1.0.26.16"