21 #ifndef __JackWinMutex__
22 #define __JackWinMutex__
24 #include "JackCompilerDeps.h"
25 #include "JackException.h"
48 fMutex = CreateMutex(NULL, FALSE, NULL);
49 ThrowIf((fMutex == 0),
JackException(
"JackBaseWinMutex: could not init the mutex"));
76 char buffer[MAX_PATH];
77 snprintf(buffer,
sizeof(buffer),
"%s_%s",
"JackWinMutex", name);
78 fMutex = CreateMutex(NULL, FALSE, buffer);
80 fMutex = CreateMutex(NULL, FALSE, NULL);
83 ThrowIf((fMutex == 0),
JackException(
"JackWinMutex: could not init the mutex"));
102 CRITICAL_SECTION fSection;
108 InitializeCriticalSection(&fSection);
113 DeleteCriticalSection(&fSection);