diff options
Diffstat (limited to '')
-rw-r--r-- | include/compat/pthread.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/compat/pthread.h b/include/compat/pthread.h index b2db760..861c8e1 100644 --- a/include/compat/pthread.h +++ b/include/compat/pthread.h | |||
@@ -38,23 +38,18 @@ pthread_once(pthread_once_t *once, void (*cb) (void)) | |||
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
41 | struct pthread { | 41 | typedef DWORD pthread_t; |
42 | HANDLE handle; | ||
43 | }; | ||
44 | typedef struct pthread pthread_t; | ||
45 | 42 | ||
46 | static inline pthread_t | 43 | static inline pthread_t |
47 | pthread_self(void) | 44 | pthread_self(void) |
48 | { | 45 | { |
49 | pthread_t self; | 46 | return GetCurrentThreadId(); |
50 | self.handle = GetCurrentThread(); | ||
51 | return self; | ||
52 | } | 47 | } |
53 | 48 | ||
54 | static inline int | 49 | static inline int |
55 | pthread_equal(pthread_t t1, pthread_t t2) | 50 | pthread_equal(pthread_t t1, pthread_t t2) |
56 | { | 51 | { |
57 | return t1.handle == t2.handle; | 52 | return t1 == t2; |
58 | } | 53 | } |
59 | 54 | ||
60 | #else | 55 | #else |