mirror of https://github.com/FreeRDP/FreeRDP
Returing WAIT_TIMEOUT for MUTEX objects now too.
This commit is contained in:
parent
c1051fe4c6
commit
17a024dcd1
|
@ -150,9 +150,7 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds)
|
|||
|
||||
status = pthread_timedjoin_np(thread->thread, &thread_status, &timeout);
|
||||
if (ETIMEDOUT == status)
|
||||
{
|
||||
return WAIT_TIMEOUT;
|
||||
}
|
||||
}
|
||||
else
|
||||
status = pthread_join(thread->thread, &thread_status);
|
||||
|
@ -180,7 +178,9 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds)
|
|||
clock_gettime(CLOCK_REALTIME, &timeout);
|
||||
ts_add_ms(&timeout, dwMilliseconds);
|
||||
|
||||
pthread_mutex_timedlock(&mutex->mutex, &timeout);
|
||||
status = pthread_mutex_timedlock(&mutex->mutex, &timeout);
|
||||
if (ETIMEDOUT == status)
|
||||
return WAIT_TIMEOUT;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue