os: Fix pipe_static_mutex on Windows.

This commit is contained in:
José Fonseca 2011-03-06 09:10:38 +00:00
parent 5e1b31066b
commit db6d0d9ebf
1 changed files with 2 additions and 1 deletions

View File

@ -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)