Alexandre Julliard : loader: Use the Mach thread port as thread id on Mac OS.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Dec 29 14:35:29 CST 2006


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 29 20:02:02 2006 +0100

loader: Use the Mach thread port as thread id on Mac OS.

---

 configure           |    2 ++
 configure.ac        |    1 +
 include/config.h.in |    3 +++
 loader/pthread.c    |    5 +++++
 4 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index a1e7660..a68d2d1 100755
--- a/configure
+++ b/configure
@@ -7028,6 +7028,7 @@ done
 
 
 
+
 for ac_header in \
 	AudioUnit/AudioUnit.h \
 	Carbon/Carbon.h \
@@ -7067,6 +7068,7 @@ for ac_header in \
 	linux/param.h \
 	linux/serial.h \
 	linux/ucdrom.h \
+	mach/mach.h \
 	mach/machine.h \
 	machine/cpu.h \
 	machine/limits.h \
diff --git a/configure.ac b/configure.ac
index 4dd936b..d56250f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,6 +197,7 @@ AC_CHECK_HEADERS(\
 	linux/param.h \
 	linux/serial.h \
 	linux/ucdrom.h \
+	mach/mach.h \
 	mach/machine.h \
 	machine/cpu.h \
 	machine/limits.h \
diff --git a/include/config.h.in b/include/config.h.in
index 6f5387a..581a246 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -423,6 +423,9 @@
 /* Define to 1 if you have the <mach/machine.h> header file. */
 #undef HAVE_MACH_MACHINE_H
 
+/* Define to 1 if you have the <mach/mach.h> header file. */
+#undef HAVE_MACH_MACH_H
+
 /* Define to 1 if you have the `memmove' function. */
 #undef HAVE_MEMMOVE
 
diff --git a/loader/pthread.c b/loader/pthread.c
index 9a7834e..17be9e4 100644
--- a/loader/pthread.c
+++ b/loader/pthread.c
@@ -34,6 +34,9 @@
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
+#ifdef HAVE_MACH_MACH_H
+#include <mach/mach.h>
+#endif
 
 #include "wine/library.h"
 #include "wine/pthread.h"
@@ -144,6 +147,8 @@ static void init_current_teb( struct win
     info->pid = getpid();
 #ifdef __sun
     info->tid = pthread_self();  /* this should return the lwp id on solaris */
+#elif defined(__APPLE__)
+    info->tid = mach_thread_self();
 #else
     info->tid = gettid();
 #endif




More information about the wine-cvs mailing list