]> gitweb.factorcode.org Git - factor.git/commitdiff
removed vm ptr from mach_signal and some other places
authorPhil Dawes <phil@phildawes.net>
Tue, 1 Sep 2009 18:40:03 +0000 (19:40 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:20:51 +0000 (08:20 +0100)
vm/mach_signal.cpp
vm/os-freebsd.cpp
vm/os-linux-arm.cpp
vm/os-linux.cpp

index ecded49c0fdfcfee7dbcea1e0f207a4a437cb0c1..03a6ca2b7247d60af6e1b91cd595b8a6117a33e0 100644 (file)
@@ -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;
        }
 }
index 64c8ac19dabbf32ff4afe81b1c126b545ffad6bf..d259658284bf649318f6765b57b9885b4226f48a 100644 (file)
@@ -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);
 }
 
 }
index 9a9ce7ada5ab728f20bb1087c15036368860f0e5..0f459d5ec5778f66c229043fd2abf3187c022c84 100644 (file)
@@ -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);
 }
 
 }
index 7929701d4157423431addf50f357f9c14bf3ae96..66b197e7c9035c475fbfdb0121cd79a550b157ad 100644 (file)
@@ -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;
 }