summaryrefslogtreecommitdiff
path: root/lib/mesa/include/c11/threads_win32.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 06:39:08 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 06:39:08 +0000
commit2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (patch)
tree04651e732331dc50a34e063cbaa0c394ccfcd327 /lib/mesa/include/c11/threads_win32.h
parentb90fb74e3c85f2799d21d1e07bf91c5fb8359eb8 (diff)
Import Mesa 17.2.8
Diffstat (limited to 'lib/mesa/include/c11/threads_win32.h')
-rw-r--r--lib/mesa/include/c11/threads_win32.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mesa/include/c11/threads_win32.h b/lib/mesa/include/c11/threads_win32.h
index d017c31c3..af7df4b9e 100644
--- a/lib/mesa/include/c11/threads_win32.h
+++ b/lib/mesa/include/c11/threads_win32.h
@@ -502,9 +502,13 @@ thrd_current(void)
HANDLE hCurrentThread;
BOOL bRet;
- /* GetCurrentThread() returns a pseudo-handle, which is useless. We need
- * to call DuplicateHandle to get a real handle. However the handle value
- * will not match the one returned by thread_create.
+ /* GetCurrentThread() returns a pseudo-handle, which we need
+ * to pass to DuplicateHandle(). Only the resulting handle can be used
+ * from other threads.
+ *
+ * Note that neither handle can be compared to the one by thread_create.
+ * Only the thread IDs - as returned by GetThreadId() and GetCurrentThreadId()
+ * can be compared directly.
*
* Other potential solutions would be:
* - define thrd_t as a thread Ids, but this would mean we'd need to OpenThread for many operations