wine_pthread_init_thread: retrieve the stack info on Darwin.
This commit is contained in:
parent
0b63877ed1
commit
d110e1f264
|
@ -11133,7 +11133,13 @@ fi
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $LIBPTHREAD"
|
LIBS="$LIBS $LIBPTHREAD"
|
||||||
|
|
||||||
for ac_func in pthread_getattr_np
|
|
||||||
|
|
||||||
|
for ac_func in \
|
||||||
|
pthread_getattr_np \
|
||||||
|
pthread_get_stackaddr_np \
|
||||||
|
pthread_get_stacksize_np \
|
||||||
|
|
||||||
do
|
do
|
||||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||||
|
|
|
@ -548,10 +548,14 @@ dnl **** Check for pthread_rwlock_t ****
|
||||||
AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
|
AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
|
||||||
#include <pthread.h>])
|
#include <pthread.h>])
|
||||||
|
|
||||||
dnl **** Check for pthread_getattr_np ****
|
dnl **** Check for pthread functions ****
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $LIBPTHREAD"
|
LIBS="$LIBS $LIBPTHREAD"
|
||||||
AC_CHECK_FUNCS(pthread_getattr_np)
|
AC_CHECK_FUNCS(\
|
||||||
|
pthread_getattr_np \
|
||||||
|
pthread_get_stackaddr_np \
|
||||||
|
pthread_get_stacksize_np \
|
||||||
|
)
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
dnl **** Check for Open Sound System ****
|
dnl **** Check for Open Sound System ****
|
||||||
|
|
|
@ -449,6 +449,12 @@
|
||||||
/* Define to 1 if you have the `pthread_getattr_np' function. */
|
/* Define to 1 if you have the `pthread_getattr_np' function. */
|
||||||
#undef HAVE_PTHREAD_GETATTR_NP
|
#undef HAVE_PTHREAD_GETATTR_NP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pthread_get_stackaddr_np' function. */
|
||||||
|
#undef HAVE_PTHREAD_GET_STACKADDR_NP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pthread_get_stacksize_np' function. */
|
||||||
|
#undef HAVE_PTHREAD_GET_STACKSIZE_NP
|
||||||
|
|
||||||
/* Define to 1 if you have the <pthread.h> header file. */
|
/* Define to 1 if you have the <pthread.h> header file. */
|
||||||
#undef HAVE_PTHREAD_H
|
#undef HAVE_PTHREAD_H
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,9 @@ void wine_pthread_init_thread( struct wine_pthread_thread_info *info )
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
pthread_getattr_np( pthread_self(), &attr );
|
pthread_getattr_np( pthread_self(), &attr );
|
||||||
pthread_attr_getstack( &attr, &info->stack_base, &info->stack_size );
|
pthread_attr_getstack( &attr, &info->stack_base, &info->stack_size );
|
||||||
|
#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
|
||||||
|
info->stack_size = pthread_get_stacksize_np(pthread_self());
|
||||||
|
info->stack_base = pthread_get_stackaddr_np(pthread_self());
|
||||||
#else
|
#else
|
||||||
/* assume that the stack allocation is page aligned */
|
/* assume that the stack allocation is page aligned */
|
||||||
char dummy;
|
char dummy;
|
||||||
|
|
Loading…
Reference in New Issue