From 387d2ae261c64396036a1c53e303364b03444257 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 11 Nov 2018 11:00:00 -0600 Subject: change windows compatibility stubs for pthread_t to be more like other OSes --- include/compat/pthread.h | 11 +++-------- 1 file 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)) return 0; } -struct pthread { - HANDLE handle; -}; -typedef struct pthread pthread_t; +typedef DWORD pthread_t; static inline pthread_t pthread_self(void) { - pthread_t self; - self.handle = GetCurrentThread(); - return self; + return GetCurrentThreadId(); } static inline int pthread_equal(pthread_t t1, pthread_t t2) { - return t1.handle == t2.handle; + return t1 == t2; } #else -- cgit v1.2.3-55-g6feb