Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: vdr 1.3.18 cCondWait::SleepMs
Luca Olivetti wrote:
> Ludwig Nussel wrote:
> > else
> >- cCondWait::SleepMs(1); // this keeps the CPU load low
> >+ playMode_condition.Wait(mutex);
>
> this line is under LOCK_THREAD....
>
> > }
> >
> > // Store the frame in the buffer:
> >@@ -521,6 +523,7 @@ void cDvbPlayer::Play(void)
> > DevicePlay();
> > playMode = pmPlay;
> > playDir = pdForward;
> >+ playMode_condition.Broadcast();
>
> ..as is this one. Am I misunderstanding LOCK_THREAD or is this creating
> a deadlock? (just asking, didn't test it). OTOH if it works it would
> avoid calling PlayPes in pmStill mode (but not in pmPause).
The trick is that the condition variable unlocks the mutex while it
waits for the broadcast.
cu
Ludwig
--
(o_ Ludwig Nussel
//\ SUSE LINUX Products GmbH, Development
V_/_ http://www.suse.de/
Home |
Main Index |
Thread Index