From db6d0d9ebf20bfc16ebabd3ff9e8f560ac306210 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sun, 6 Mar 2011 09:10:38 +0000 Subject: os: Fix pipe_static_mutex on Windows. --- src/gallium/auxiliary/os/os_thread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/os/os_thread.h') 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) -- cgit v1.2.3