mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
parent
96d30fa820
commit
7d8e76ecaf
|
@ -513,7 +513,7 @@ void lock_release(LOCK lock)
|
|||
void semaphore_destroy(SEMAPHORE *sem) { sem_destroy(sem); }
|
||||
#elif defined(CONF_FAMILY_WINDOWS)
|
||||
void semaphore_init(SEMAPHORE *sem) { *sem = CreateSemaphore(0, 0, 10000, 0); }
|
||||
void semaphore_wait(SEMAPHORE *sem) { WaitForSingleObject((HANDLE)*sem, 0L); }
|
||||
void semaphore_wait(SEMAPHORE *sem) { WaitForSingleObject((HANDLE)*sem, INFINITE); }
|
||||
void semaphore_signal(SEMAPHORE *sem) { ReleaseSemaphore((HANDLE)*sem, 1, NULL); }
|
||||
void semaphore_destroy(SEMAPHORE *sem) { CloseHandle((HANDLE)*sem); }
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue