medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 94dc80d948119268183f528f92cb620a2e0210ac
parent a390925fb2d51d21a260674f75160ded0c131b5c
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu Sep 15 14:33:07 +0100

Don't FATAL if we hit the semaphore post limit

Diffstat:
win32_semaphore.h | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/win32_semaphore.h b/win32_semaphore.h @@ -19,6 +19,11 @@ inline void semaphore_init( Semaphore * sem ) { inline void semaphore_signal( Semaphore * sem ) { if( ReleaseSemaphore( sem->sem, 1, NULL ) == 0 ) { + DWORD error = GetLastError(); + if( error == ERROR_TOO_MANY_POSTS ) { + return; + } + FATAL( "ReleaseSemaphore failed" ); } }