|
@@ -29,10 +29,6 @@
|
|
|
#include <sys/types.h>
|
|
|
#endif
|
|
|
|
|
|
-#if defined(__FreeBSD__)
|
|
|
-#include <pthread_np.h>
|
|
|
-#endif
|
|
|
-
|
|
|
#ifdef WINDOWS
|
|
|
#include <windows.h>
|
|
|
#endif
|
|
@@ -278,17 +274,7 @@ static void pthreads_locking_callback(int mode, int type, char *file, int line)
|
|
|
|
|
|
static unsigned long pthreads_thread_id(void)
|
|
|
{
|
|
|
- unsigned long thread_id = 0;
|
|
|
-#if defined(__linux__)
|
|
|
- thread_id = (unsigned long)syscall(SYS_gettid);
|
|
|
-#elif defined(__FreeBSD__)
|
|
|
- thread_id = (unsigned long)pthread_getthreadid_np();
|
|
|
-#elif defined(__sun)
|
|
|
- thread_id = (unsigned long)pthread_self();
|
|
|
-#else
|
|
|
-#error "Platform not supported"
|
|
|
-#endif
|
|
|
- return thread_id;
|
|
|
+ return (unsigned long)syscall(SYS_gettid);
|
|
|
}
|
|
|
|
|
|
#endif /* UNIX */
|