Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: wait_event_interruptible_timeout not working correctly



Hello,

On 03/12/04 01:42, Ralph Metzler wrote:
Andrew de Quincey writes:
> > If you look in dvb_frontend_thread(), there is a main loop with the following call:
> timeout = wait_event_interruptible_timeout(fe->wait_queue,0 != dvb_frontend_is_exiting (fe), delay);
> > This sleeps for a delay of 3*HZ (initially), or until the frontend thread is told to exit, or the wait queue is woken up.


No, internally it will wake up when the wait queue is woken but
it will go back to sleep (schedule()) if the condition is not met.
See /usr/src/linux/include/linux/sched.h or wait.h (depending on
kernel version)
Argh. Thanks for the hint. I recently replaced the usage of interruptible_sleep_on_timeout() with wait_event_interruptible_timeout() and apparently did not fully understand the differences.

If you want to use it you will have to use some extra flag which indicates that tuning is needed and check for dvb_frontend_exiting
and (or rather OR) this flag as a wakeup condition.
Right.

Andrew, do you fix this problem by yourself or do you want me to change it so it works like before?

Ralph
CU
Michael.


--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index