From 0839ea104ac13fcefec44c26e5b4e80cd0bb7cd3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 7 Sep 2006 18:08:46 +0200 Subject: [PATCH] ntdll: Added sysctl to make the signal stack per-thread on MacOS. --- dlls/ntdll/signal_i386.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index dbd6bfeeb02..72144bdaeb1 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -51,6 +51,9 @@ #ifdef HAVE_SYS_SIGNAL_H # include #endif +#ifdef HAVE_SYS_SYSCTL_H +# include +#endif #include "windef.h" #include "thread.h" @@ -1301,6 +1304,15 @@ BOOL SIGNAL_Init(void) #ifdef HAVE_SIGALTSTACK struct sigaltstack ss; + +#ifdef __APPLE__ + int mib[2], val = 1; + + mib[0] = CTL_KERN; + mib[1] = KERN_THALTSTACK; + sysctl( mib, 2, NULL, NULL, &val, sizeof(val) ); +#endif + ss.ss_sp = get_signal_stack(); ss.ss_size = signal_stack_size; ss.ss_flags = 0;