aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-17 21:01:54 -0700
committerChris Robinson <[email protected]>2014-04-17 21:01:54 -0700
commit5abefaed0a21b1c97decdf6a40d582a0ac41a3ed (patch)
treeed5aac10457e4f13d29b6d6ef3ca62aa73803d0b /OpenAL32/Include
parent36df67f546c3162e06964ca6a2466023647c7485 (diff)
Use the thread ID for althrd_t on Windows
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/threads.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenAL32/Include/threads.h b/OpenAL32/Include/threads.h
index 1d9f7640..eade2406 100644
--- a/OpenAL32/Include/threads.h
+++ b/OpenAL32/Include/threads.h
@@ -29,7 +29,7 @@ typedef void (*altss_dtor_t)(void*);
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-typedef HANDLE althrd_t;
+typedef DWORD althrd_t;
typedef CRITICAL_SECTION almtx_t;
typedef DWORD altss_t;
@@ -46,16 +46,12 @@ int althrd_sleep(const struct timespec *ts, struct timespec *rem);
inline althrd_t althrd_current(void)
{
- /* This is wrong. GetCurrentThread() returns a psuedo-handle of -1 which
- * various functions will interpret as the calling thread. There is no
- * apparent way to retrieve the same handle that was returned by
- * CreateThread. */
- return GetCurrentThread();
+ return GetCurrentThreadId();
}
inline int althrd_equal(althrd_t thr0, althrd_t thr1)
{
- return GetThreadId(thr0) == GetThreadId(thr1);
+ return thr0 == thr1;
}
inline void althrd_exit(int res)