#ifdef LISP_FEATURE_PPC
/* PPC calls alloc() from a trap, look up the most
* recent one and frob that. */
- {
- int context_index =
- fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,
- thread));
- os_context_t *context =
- thread->interrupt_contexts[context_index - 1];
- maybe_save_gc_mask_and_block_deferrables(context);
- }
+ maybe_save_gc_mask_and_block_deferrables
+ (get_interrupt_context_for_thread(thread));
#else
maybe_save_gc_mask_and_block_deferrables(NULL);
#endif
if ((alloc_signal & FIXNUM_TAG_MASK) == 0) {
if ((signed long) alloc_signal <= 0) {
SetSymbolValue(ALLOC_SIGNAL, T, thread);
- thread_kill(thread->os_thread, SIGPROF);
+ raise(SIGPROF);
} else {
SetSymbolValue(ALLOC_SIGNAL,
alloc_signal - (1 << N_FIXNUM_TAG_BITS),
return 0;
} else {
+ int ret;
+ ret = thread_mutex_lock(&free_pages_lock);
+ gc_assert(ret == 0);
if (page_table[page_index].write_protected) {
/* Unprotect the page. */
os_protect(page_address(page_index), PAGE_BYTES, OS_VM_PROT_ALL);
page_index, boxed_region.first_page,
boxed_region.last_page);
}
+ ret = thread_mutex_unlock(&free_pages_lock);
+ gc_assert(ret == 0);
/* Don't worry, we can handle it. */
return 1;
}