diff options
author | Nikias Bassen | 2014-03-21 20:42:38 +0100 |
---|---|---|
committer | Nikias Bassen | 2014-03-21 20:42:38 +0100 |
commit | d95dfaacb04448230a4ab6a3fb152d96d13e959f (patch) | |
tree | 467d0d179502b142418ad11d15ec972fa209abd2 /common | |
parent | a406cfaa4724b3a78683b732f016c9ad33cad187 (diff) | |
download | libimobiledevice-d95dfaacb04448230a4ab6a3fb152d96d13e959f.tar.gz libimobiledevice-d95dfaacb04448230a4ab6a3fb152d96d13e959f.tar.bz2 |
common: add THREAD_ID macro
Diffstat (limited to 'common')
-rw-r--r-- | common/thread.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <pthread.h> 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); |