removed vm ptr from mach_signal and some other places
parent
544bc3cd33
commit
9e460f6dec
|
@ -41,18 +41,18 @@ static void call_fault_handler(
|
|||
a divide by zero or stack underflow in the listener */
|
||||
|
||||
/* Are we in compiled Factor code? Then use the current stack pointer */
|
||||
if(vm->in_code_heap_p(MACH_PROGRAM_COUNTER(thread_state)))
|
||||
vm->signal_callstack_top = (stack_frame *)MACH_STACK_POINTER(thread_state);
|
||||
if(SIGNAL_VM_PTR()->in_code_heap_p(MACH_PROGRAM_COUNTER(thread_state)))
|
||||
SIGNAL_VM_PTR()->signal_callstack_top = (stack_frame *)MACH_STACK_POINTER(thread_state);
|
||||
/* Are we in C? Then use the saved callstack top */
|
||||
else
|
||||
vm->signal_callstack_top = NULL;
|
||||
SIGNAL_VM_PTR()->signal_callstack_top = NULL;
|
||||
|
||||
MACH_STACK_POINTER(thread_state) = fix_stack_pointer(MACH_STACK_POINTER(thread_state));
|
||||
|
||||
/* Now we point the program counter at the right handler function. */
|
||||
if(exception == EXC_BAD_ACCESS)
|
||||
{
|
||||
vm->signal_fault_addr = MACH_EXC_STATE_FAULT(exc_state);
|
||||
SIGNAL_VM_PTR()->signal_fault_addr = MACH_EXC_STATE_FAULT(exc_state);
|
||||
MACH_PROGRAM_COUNTER(thread_state) = (cell)memory_signal_handler_impl;
|
||||
}
|
||||
else if(exception == EXC_ARITHMETIC && code != MACH_EXC_INTEGER_DIV)
|
||||
|
@ -63,7 +63,7 @@ static void call_fault_handler(
|
|||
}
|
||||
else
|
||||
{
|
||||
vm->signal_number = (exception == EXC_ARITHMETIC ? SIGFPE : SIGABRT);
|
||||
SIGNAL_VM_PTR()->signal_number = (exception == EXC_ARITHMETIC ? SIGFPE : SIGABRT);
|
||||
MACH_PROGRAM_COUNTER(thread_state) = (cell)misc_signal_handler_impl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ const char *vm_executable_path()
|
|||
if(strcmp(path, "unknown") == 0)
|
||||
return NULL;
|
||||
|
||||
return vm->safe_strdup(path);
|
||||
return safe_strdup(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ void flush_icache(cell start, cell len)
|
|||
: "r0","r1","r2");
|
||||
|
||||
if(result < 0)
|
||||
vm->critical_error("flush_icache() failed",result);
|
||||
SIGNAL_VM_PTR->critical_error("flush_icache() failed",result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,19 +42,19 @@ VM_C_API int inotify_rm_watch(int fd, u32 wd)
|
|||
|
||||
VM_C_API int inotify_init()
|
||||
{
|
||||
vm->not_implemented_error();
|
||||
VM_PTR->not_implemented_error();
|
||||
return -1;
|
||||
}
|
||||
|
||||
VM_C_API int inotify_add_watch(int fd, const char *name, u32 mask)
|
||||
{
|
||||
vm->not_implemented_error();
|
||||
VM_PTR->not_implemented_error();
|
||||
return -1;
|
||||
}
|
||||
|
||||
VM_C_API int inotify_rm_watch(int fd, u32 wd)
|
||||
{
|
||||
vm->not_implemented_error();
|
||||
VM_PTR->not_implemented_error();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue