Small winapi fixes

This commit is contained in:
Jacob Dufault 2017-03-20 23:03:59 -07:00
parent 95f6a0df1c
commit cd4d63dd9c

View File

@ -53,13 +53,13 @@ struct PlatformScopedMutexLockWin : public PlatformScopedMutexLock {
PlatformScopedMutexLockWin(HANDLE raw_mutex) : raw_mutex(raw_mutex) { PlatformScopedMutexLockWin(HANDLE raw_mutex) : raw_mutex(raw_mutex) {
DWORD result = WaitForSingleObject(raw_mutex, INFINITE); DWORD result = WaitForSingleObject(raw_mutex, INFINITE);
assert(result != WAIT_FAILED); assert(result == WAIT_OBJECT_0);
CheckForError({} /*allow*/); CheckForError({ ERROR_NO_MORE_FILES, ERROR_ALREADY_EXISTS } /*allow*/);
} }
~PlatformScopedMutexLockWin() override { ~PlatformScopedMutexLockWin() override {
ReleaseMutex(raw_mutex); ReleaseMutex(raw_mutex);
CheckForError({} /*allow*/); CheckForError({ ERROR_NO_MORE_FILES, ERROR_ALREADY_EXISTS } /*allow*/);
} }
}; };