summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-03-06 09:10:38 +0000
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-03-06 09:10:38 +0000
commitdb6d0d9ebf20bfc16ebabd3ff9e8f560ac306210 (patch)
tree6f1302195331f3d76b87c1cda0615d918087efb1 /src/gallium/auxiliary
parent5e1b31066b44713971e2770b3c8fe9e5eea286bf (diff)
os: Fix pipe_static_mutex on Windows.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index a084310d4f..8173d4cc37 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -152,8 +152,9 @@ static INLINE int pipe_thread_destroy( pipe_thread thread )
*/
typedef CRITICAL_SECTION pipe_mutex;
+/* http://locklessinc.com/articles/pthreads_on_windows/ */
#define pipe_static_mutex(mutex) \
- /*static*/ pipe_mutex mutex = {0,0,0,0,0,0}
+ static pipe_mutex mutex = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
#define pipe_mutex_init(mutex) \
InitializeCriticalSection(&mutex)