aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/compat/pthread.h11
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
41struct pthread { 41typedef DWORD pthread_t;
42 HANDLE handle;
43};
44typedef struct pthread pthread_t;
45 42
46static inline pthread_t 43static inline pthread_t
47pthread_self(void) 44pthread_self(void)
48{ 45{
49 pthread_t self; 46 return GetCurrentThreadId();
50 self.handle = GetCurrentThread();
51 return self;
52} 47}
53 48
54static inline int 49static inline int
55pthread_equal(pthread_t t1, pthread_t t2) 50pthread_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