X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fplatform%2Fposix%2Fos-threads.h;h=48e1e355ca16e8ee18965852cda41bfd48329c63;hb=2563e7ebe9a465b5905bfe2b710975db5cd4d1c8;hp=f417b12d2901dec4d3a6fe11c47ada5ddf1a0a40;hpb=3a590d6a4652d1c47026446dcdc44ac9852f8af3;p=deb_libcec.git diff --git a/src/lib/platform/posix/os-threads.h b/src/lib/platform/posix/os-threads.h index f417b12..48e1e35 100644 --- a/src/lib/platform/posix/os-threads.h +++ b/src/lib/platform/posix/os-threads.h @@ -95,12 +95,12 @@ namespace PLATFORM bool Wait(mutex_t &mutex, uint32_t iTimeoutMs) { sched_yield(); - if (iTimeout > 0) + if (iTimeoutMs > 0) { - struct timespec timeout = GetAbsTime(iTimeout); - return (pthread_cond_timedwait(&cond, &mutex, &timeout) == 0); + struct timespec timeout = GetAbsTime(iTimeoutMs); + return (pthread_cond_timedwait(&m_condition, &mutex, &timeout) == 0); } - return (pthread_cond_wait(&cond, &mutex) == 0); + return (pthread_cond_wait(&m_condition, &mutex) == 0); } pthread_cond_t m_condition;