X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fnasal%2Fthread-win32.c;h=7a459560dfda24de0803c446380795858603704e;hb=9cbbe5559844317f44744788ddb308101a1e75e9;hp=ae63023a7b99df0016d65da262dc03262c1447b0;hpb=b05e32fa8c11e6d66bb70850751e170dc472a1a3;p=simgear.git diff --git a/simgear/nasal/thread-win32.c b/simgear/nasal/thread-win32.c index ae63023a..7a459560 100644 --- a/simgear/nasal/thread-win32.c +++ b/simgear/nasal/thread-win32.c @@ -13,9 +13,11 @@ void* naNewLock() void naLock(void* lock) { EnterCriticalSection((LPCRITICAL_SECTION)lock); } void naUnlock(void* lock) { LeaveCriticalSection((LPCRITICAL_SECTION)lock); } +void naFreeLock(void* lock) { free(lock); } void* naNewSem() { return CreateSemaphore(0, 0, MAX_SEM_COUNT, 0); } void naSemDown(void* sem) { WaitForSingleObject((HANDLE)sem, INFINITE); } void naSemUp(void* sem, int count) { ReleaseSemaphore(sem, count, 0); } +void naFreeSem(void* sem) { ReleaseSemaphore(sem, 1, 0); } #endif