X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fnasal%2Fthread-win32.c;h=7a459560dfda24de0803c446380795858603704e;hb=423eba373389684061fc0a8c7b78292f10011ed7;hp=c86c1f764ed5a4dcb382a3110d0d39ceb05dd604;hpb=966331dac7da0f9ec03ffeb052dd2cd72829b2eb;p=simgear.git diff --git a/simgear/nasal/thread-win32.c b/simgear/nasal/thread-win32.c index c86c1f76..7a459560 100644 --- a/simgear/nasal/thread-win32.c +++ b/simgear/nasal/thread-win32.c @@ -13,8 +13,12 @@ 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 naSemUpAll(void* sem, int count) { ReleaseSemaphore(sem, count, 0); } +void naSemUp(void* sem, int count) { ReleaseSemaphore(sem, count, 0); } +void naFreeSem(void* sem) { ReleaseSemaphore(sem, 1, 0); } #endif + +extern int GccWarningWorkaround_IsoCForbidsAnEmptySourceFile;