boolean
arch_pseudo_atomic_atomic(os_context_t *context)
{
- return ((*os_context_register_addr(context,reg_ALLOC)) & 4);
+ /* FIXME: this foreign_function_call_active test is dubious at
+ * best. If a foreign call is made in a pseudo atomic section
+ * (?) or more likely a pseudo atomic section is in a foreign
+ * call then an interrupt is executed immediately. Maybe it
+ * has to do with C code not maintaining pseudo atomic
+ * properly. MG - 2005-08-10
+ *
+ * The foreign_function_call_active used to live at each call-site
+ * to arch_pseudo_atomic_atomic, but this seems clearer.
+ * --NS 2007-05-15 */
+ return (!foreign_function_call_active)
+ && ((*os_context_register_addr(context,reg_ALLOC)) & 4);
}
void
if ((code >> 16) == ((3 << 10) | (6 << 5))) {
/* twllei reg_ZERO,N will always trap if reg_ZERO = 0 */
int trap = code & 0x1f;
-
- if (!maybe_handle_trap(context,trap))
- interrupt_handle_now(signal, siginfo, context);
+ handle_trap(context,trap);
#ifdef LISP_FEATURE_DARWIN
DARWIN_FIX_CONTEXT(context);
undoably_install_low_level_interrupt_handler(SIGTRAP,sigtrap_handler);
}
-
-extern lispobj call_into_lisp(lispobj fun, lispobj *args, int nargs);
-
-lispobj funcall0(lispobj function)
-{
- lispobj *args = current_control_stack_pointer;
-
- return call_into_lisp(function, args, 0);
-}
-
-lispobj funcall1(lispobj function, lispobj arg0)
-{
- lispobj *args = current_control_stack_pointer;
-
- current_control_stack_pointer += 1;
- args[0] = arg0;
-
- return call_into_lisp(function, args, 1);
-}
-
-lispobj funcall2(lispobj function, lispobj arg0, lispobj arg1)
-{
- lispobj *args = current_control_stack_pointer;
-
- current_control_stack_pointer += 2;
- args[0] = arg0;
- args[1] = arg1;
-
- return call_into_lisp(function, args, 2);
-}
-
-lispobj funcall3(lispobj function, lispobj arg0, lispobj arg1, lispobj arg2)
-{
- lispobj *args = current_control_stack_pointer;
-
- current_control_stack_pointer += 3;
- args[0] = arg0;
- args[1] = arg1;
- args[2] = arg2;
-
- return call_into_lisp(function, args, 3);
-}
-
void
ppc_flush_icache(os_vm_address_t address, os_vm_size_t length)
{