469416f988bcd471fb6058cdfb5ffebe840545da |
|
01-Aug-2014 |
Emil Velikov <emil.l.velikov@gmail.com> |
c11/threads: correct assertion We should assert when either the function or the flag pointer is null or we'll end up with a null reference a few lines later. Currently unused by mesa thus it has gone unnoticed. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/include/c11/threads_win32.h
|
eaf9affa5ec9c5fd919e4207ab80b4677650ac67 |
|
19-Mar-2014 |
Brian Paul <brianp@vmware.com> |
c11/threads: don't include assert.h if the assert macro is already defined In the gallium code, the assert() macro could come from either the system's assert.h file (via c11/threads.h) or from gallium's u_debug.h. It looks like all known assert.h files unconditionally #undef assert before defining their own version. So the assert you get depends on whether threads.h or u_debug.h was included last. In the gallium code we really want to use the assert() from u_debug.h (it behaves better on Windows). In gallium, c11/threads.h is only included after u_debug.h in the os_thread.h wrapper. So Adding an #ifndef assert test in the threads*.h files avoids using the system's assert(). Cc: "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/include/c11/threads_win32.h
|
a61d859519d520b849c11ad5c1c1972870abd956 |
|
03-Mar-2014 |
José Fonseca <jfonseca@vmware.com> |
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>
/external/mesa3d/include/c11/threads_win32.h
|
f34d75d6f69f4c0bf391e0adf1fd469601b01b04 |
|
03-Mar-2014 |
José Fonseca <jfonseca@vmware.com> |
c11/threads: Fix nano to milisecond conversion. Per https://gist.github.com/yohhoy/2223710/#comment-710118 Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net>
/external/mesa3d/include/c11/threads_win32.h
|
f29968b2709f0c4bc2fe981fe791094f70d11044 |
|
28-Jan-2014 |
José Fonseca <jfonseca@vmware.com> |
c11: Add missing stdlib.h include. For malloc/free. Silences gcc mingw warnings.
/external/mesa3d/include/c11/threads_win32.h
|
799f30f3854a30569bb356d1640c0e3f11de0be2 |
|
23-Jan-2014 |
José Fonseca <jfonseca@vmware.com> |
c11: Update docs/license.html and include verbatim copy of Boost license.
/external/mesa3d/include/c11/threads_win32.h
|
ecaa81bd9648131e01f9ad4fd9d185370df8e872 |
|
12-Mar-2013 |
José Fonseca <jfonseca@vmware.com> |
c11: Import threads.h emulation library. Implementation is based of https://gist.github.com/2223710 with the following modifications: - inline implementatation - retain XP compatability - add temporary hack for static mutex initializers (as they are not part of the stack but still widely used internally) - make TIME_UTC a conditional macro (some system headers already define it, so this prevents conflict) - respect HAVE_PTHREAD macro Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/include/c11/threads_win32.h
|