loader: Use the Mach thread port as thread id on Mac OS.
This commit is contained in:
parent
cd1c7fc056
commit
150b5dcaef
|
@ -7026,6 +7026,7 @@ done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_header in \
|
for ac_header in \
|
||||||
|
@ -7067,6 +7068,7 @@ for ac_header in \
|
||||||
linux/param.h \
|
linux/param.h \
|
||||||
linux/serial.h \
|
linux/serial.h \
|
||||||
linux/ucdrom.h \
|
linux/ucdrom.h \
|
||||||
|
mach/mach.h \
|
||||||
mach/machine.h \
|
mach/machine.h \
|
||||||
machine/cpu.h \
|
machine/cpu.h \
|
||||||
machine/limits.h \
|
machine/limits.h \
|
||||||
|
|
|
@ -197,6 +197,7 @@ AC_CHECK_HEADERS(\
|
||||||
linux/param.h \
|
linux/param.h \
|
||||||
linux/serial.h \
|
linux/serial.h \
|
||||||
linux/ucdrom.h \
|
linux/ucdrom.h \
|
||||||
|
mach/mach.h \
|
||||||
mach/machine.h \
|
mach/machine.h \
|
||||||
machine/cpu.h \
|
machine/cpu.h \
|
||||||
machine/limits.h \
|
machine/limits.h \
|
||||||
|
|
|
@ -423,6 +423,9 @@
|
||||||
/* Define to 1 if you have the <mach/machine.h> header file. */
|
/* Define to 1 if you have the <mach/machine.h> header file. */
|
||||||
#undef HAVE_MACH_MACHINE_H
|
#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. */
|
/* Define to 1 if you have the `memmove' function. */
|
||||||
#undef HAVE_MEMMOVE
|
#undef HAVE_MEMMOVE
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
#ifdef HAVE_SYS_MMAN_H
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_MACH_MACH_H
|
||||||
|
#include <mach/mach.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
#include "wine/pthread.h"
|
#include "wine/pthread.h"
|
||||||
|
@ -144,6 +147,8 @@ static void init_current_teb( struct wine_pthread_thread_info *info )
|
||||||
info->pid = getpid();
|
info->pid = getpid();
|
||||||
#ifdef __sun
|
#ifdef __sun
|
||||||
info->tid = pthread_self(); /* this should return the lwp id on solaris */
|
info->tid = pthread_self(); /* this should return the lwp id on solaris */
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
info->tid = mach_thread_self();
|
||||||
#else
|
#else
|
||||||
info->tid = gettid();
|
info->tid = gettid();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue