Thread (8 messages) flat view 8 messages, 3 authors, 2007-08-13

Re: basic and stupid question on wait_event and wake_up

From: Laurent Pinchart <hidden>
Date: 2007-08-13 09:30:15

On Monday 13 August 2007 11:22, Ming Liu wrote:
Dear Momen,
OK. I see now. So you mean condition is only to judge whether a sleeping
process could be waken up or not when wake_up() is executed in other
processes or interrupt handlers. What really wakes the process up is still
the function of wake_up, right? We just execute wake_up() and then check if
condition is true. If yes, the process will leave its sleeping and wake up;
if not, it keep sleeping. Am I right?
Actually, the process will wake up every time you call wake_up(). It will then 
evaluate the condition. If the condition is true, the process will return 
from wait_event. If the condition is false, it will go back to sleep.

Best regards,

Laurent Pinchart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help