Alexandre Julliard : ntdll: Added sysctl to make the signal stack per-thread on MacOS.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Sep 8 05:15:25 CDT 2006


Module: wine
Branch: master
Commit: 0839ea104ac13fcefec44c26e5b4e80cd0bb7cd3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=0839ea104ac13fcefec44c26e5b4e80cd0bb7cd3

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep  7 18:08:46 2006 +0200

ntdll: Added sysctl to make the signal stack per-thread on MacOS.

---

 dlls/ntdll/signal_i386.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index dbd6bfe..72144bd 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -51,6 +51,9 @@ #endif
 #ifdef HAVE_SYS_SIGNAL_H
 # include <sys/signal.h>
 #endif
+#ifdef HAVE_SYS_SYSCTL_H
+# include <sys/sysctl.h>
+#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;




More information about the wine-cvs mailing list