Log native thread ID when a thread is created.
If possible gettid() is used, otherwise pthread_self() is logged (which is not completely portable, but seems to work on most supported platforms).
This commit is contained in:
@@ -380,6 +380,17 @@ dnl check if native rwlocks are available
|
||||
AC_CHECK_FUNCS(pthread_rwlock_init)
|
||||
LIBS=$saved_LIBS
|
||||
|
||||
AC_MSG_CHECKING([for gettid])
|
||||
AC_TRY_COMPILE(
|
||||
[#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>],
|
||||
[int main() {
|
||||
return syscall(SYS_gettid);}],
|
||||
[AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETTID])],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
AC_CHECK_FUNCS(prctl mallinfo getpass closefrom)
|
||||
|
||||
AC_CHECK_HEADERS(sys/sockio.h glob.h)
|
||||
|
||||
Reference in New Issue
Block a user