wasnt needed

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@694 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-13 14:59:12 +00:00
parent fd918a1d5c
commit 3f4a813115
3 changed files with 0 additions and 88 deletions

View File

@@ -1,44 +0,0 @@
/* $Id$ */
#include <Mw/Milsko.h>
#if defined(_WIN32)
void* MwMutexCreate(void) {
return CreateEvent(NULL, FALSE, TRUE, NULL);
}
void MwMutexDestroy(void* handle) {
CloseHandle(handle);
}
void MwMutexLock(void* handle) {
WaitForSingleObject(handle, INFINITE);
}
void MwMutexUnlock(void* handle) {
SetEvent(handle);
}
#elif defined(__unix__)
#include <pthread.h>
void* MwMutexCreate(void) {
pthread_mutex_t* m = malloc(sizeof(*m));
pthread_mutex_init(m, NULL);
return m;
}
void MwMutexDestroy(void* handle) {
pthread_mutex_destroy(handle);
free(handle);
}
void MwMutexLock(void* handle) {
pthread_mutex_lock(handle);
}
void MwMutexUnlock(void* handle) {
pthread_mutex_unlock(handle);
}
#endif