From d95dfaacb04448230a4ab6a3fb152d96d13e959f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 21 Mar 2014 20:42:38 +0100 Subject: common: add THREAD_ID macro --- common/thread.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/thread.h b/common/thread.h index 5d20083..9b15cc4 100644 --- a/common/thread.h +++ b/common/thread.h @@ -31,12 +31,14 @@ typedef volatile struct { int state; } thread_once_t; #define THREAD_ONCE_INIT {0, 0} +#define THREAD_ID GetCurrentThreadId() #else #include typedef pthread_t thread_t; typedef pthread_mutex_t mutex_t; typedef pthread_once_t thread_once_t; #define THREAD_ONCE_INIT PTHREAD_ONCE_INIT +#define THREAD_ID pthread_self() #endif typedef void* (*thread_func_t)(void* data); -- cgit v1.1-32-gdbae