8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 22:03:04 +01:00

Simplification.

This commit is contained in:
robocop 2011-02-18 04:30:45 +00:00
parent c916dc94e9
commit d54b4a731f

View File

@ -2924,8 +2924,7 @@ static DWORD enterFastMutex(FAST_MUTEX* lpMutex, DWORD dwMilliseconds)
unlockSharedSection(lpSect); unlockSharedSection(lpSect);
// TODO actual timeout can be of any length // TODO actual timeout can be of any length
const DWORD tm = (dwMilliseconds == INFINITE) ? 5000 : const DWORD tm = (dwMilliseconds == INFINITE || dwMilliseconds > 5000) ? 5000 : dwMilliseconds;
((dwMilliseconds > 5000) ? 5000 : dwMilliseconds);
const DWORD dwResult = WaitForSingleObject(lpMutex->hEvent, tm); const DWORD dwResult = WaitForSingleObject(lpMutex->hEvent, tm);
InterlockedDecrement(FIX_TYPE(&lpSect->lThreadsWaiting)); InterlockedDecrement(FIX_TYPE(&lpSect->lThreadsWaiting));