|
|
@@ -23,6 +23,9 @@ |
|
|
|
|
|
|
|
#include "JackCompilerDeps.h" |
|
|
|
#include "JackException.h" |
|
|
|
#ifdef __MINGW32__ |
|
|
|
#include <winsock2.h> |
|
|
|
#endif |
|
|
|
#include <windows.h> |
|
|
|
#include <stdio.h> |
|
|
|
|
|
|
@@ -71,13 +74,13 @@ class SERVER_EXPORT JackWinMutex |
|
|
|
|
|
|
|
JackWinMutex(const char* name = NULL) |
|
|
|
{ |
|
|
|
// In recursive mode by default
|
|
|
|
// In recursive mode by default |
|
|
|
if (name) { |
|
|
|
char buffer[MAX_PATH]; |
|
|
|
snprintf(buffer, sizeof(buffer), "%s_%s", "JackWinMutex", name); |
|
|
|
fMutex = CreateMutex(NULL, FALSE, buffer);
|
|
|
|
} else {
|
|
|
|
fMutex = CreateMutex(NULL, FALSE, NULL);
|
|
|
|
fMutex = CreateMutex(NULL, FALSE, buffer); |
|
|
|
} else { |
|
|
|
fMutex = CreateMutex(NULL, FALSE, NULL); |
|
|
|
} |
|
|
|
|
|
|
|
ThrowIf((fMutex == 0), JackException("JackWinMutex: could not init the mutex")); |
|
|
|