X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-darwin-os.c;h=1cc837c02e7ecc1bd147636677c635fd06de148b;hb=4bf2de6a2adff75459cf218c8bff67f6cdb91211;hp=f1d7b6ce4b914e121a0628ea1d1816f81a165820;hpb=8d2697777cef42c9611a015ee13292ca612b8f89;p=sbcl.git diff --git a/src/runtime/x86-darwin-os.c b/src/runtime/x86-darwin-os.c index f1d7b6c..1cc837c 100644 --- a/src/runtime/x86-darwin-os.c +++ b/src/runtime/x86-darwin-os.c @@ -1,5 +1,3 @@ - - #ifdef LISP_FEATURE_SB_THREAD #include #include @@ -25,6 +23,7 @@ #include #include #include +#include #ifdef LISP_FEATURE_SB_THREAD @@ -116,9 +115,10 @@ int arch_os_thread_cleanup(struct thread *thread) { #ifdef LISP_FEATURE_MACH_EXCEPTION_HANDLER -void sigill_handler(int signal, siginfo_t *siginfo, void *void_context); -void sigtrap_handler(int signal, siginfo_t *siginfo, void *void_context); -void memory_fault_handler(int signal, siginfo_t *siginfo, void *void_context); +void sigill_handler(int signal, siginfo_t *siginfo, os_context_t *context); +void sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context); +void memory_fault_handler(int signal, siginfo_t *siginfo, + os_context_t *context); /* exc_server handles mach exception messages from the kernel and * calls catch exception raise. We use the system-provided @@ -371,8 +371,8 @@ void dump_context(x86_thread_state32_t *thread_state) #endif void -control_stack_exhausted_handler(int signal, siginfo_t *siginfo, void *void_context) { - os_context_t *context = arch_os_get_context(&void_context); +control_stack_exhausted_handler(int signal, siginfo_t *siginfo, + os_context_t *context) { unblock_signals_in_context_and_maybe_warn(context); arrange_return_to_lisp_function @@ -380,9 +380,7 @@ control_stack_exhausted_handler(int signal, siginfo_t *siginfo, void *void_conte } void -undefined_alien_handler(int signal, siginfo_t *siginfo, void *void_context) { - os_context_t *context = arch_os_get_context(&void_context); - +undefined_alien_handler(int signal, siginfo_t *siginfo, os_context_t *context) { arrange_return_to_lisp_function (context, StaticSymbolFunction(UNDEFINED_ALIEN_VARIABLE_ERROR)); } @@ -432,15 +430,15 @@ catch_exception_raise(mach_port_t exception_port, } /* At stack guard */ if (os_trunc_to_page(addr) == CONTROL_STACK_GUARD_PAGE(th)) { - protect_control_stack_guard_page_thread(0, th); - protect_control_stack_return_guard_page_thread(1, th); + protect_control_stack_guard_page(0, th); + protect_control_stack_return_guard_page(1, th); handler = control_stack_exhausted_handler; break; } /* Return from stack guard */ if (os_trunc_to_page(addr) == CONTROL_STACK_RETURN_GUARD_PAGE(th)) { - protect_control_stack_guard_page_thread(1, th); - protect_control_stack_return_guard_page_thread(0, th); + protect_control_stack_guard_page(1, th); + protect_control_stack_return_guard_page(0, th); break; } /* Regular memory fault */