mesa/include/c11
José Fonseca a61d859519 c11/threads: Don't implement thrd_current on Windows.
GetCurrentThread() returns a pseudo-handle (a constant which only makes
sense when used within the calling thread) and not a real handle.

DuplicateHandle() will return a real handle, but it will create a new
handle every time we call.  Calling DuplicateHandle() here means we will
leak handles, which can cause serious problems.

In short, the Windows implementation of thrd_t needs a thorough make
over, and it won't be pretty.  It looks like C11 committee
over-simplified things: it would be much better to have seperate objects
for threads and thread IDs like C++11 does.

For now, just comment out the thrd_current() implementation, so we get
build errors if anybody tries to use it.

Thanks to Brian Paul for spotting and diagnosing this problem.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-04 12:05:23 +00:00
..
threads.h c11: Update docs/license.html and include verbatim copy of Boost license. 2014-01-23 12:55:55 +00:00
threads_posix.h c11: Do not use pthread_mutex_timedlock on NetBSD. 2014-01-24 18:20:42 -08:00
threads_win32.h c11/threads: Don't implement thrd_current on Windows. 2014-03-04 12:05:23 +00:00