Re: basic and stupid question on wait_event and wake_up

2007-08-13 Thread Domen Puncer
On 12/08/07 13:57 +, Ming Liu wrote: Dear all, I am reading LDD(V3) chapter 6 on the topic of wait_event(queue, condition) and wake_up(queue) functions. I am quite confused on the sayings. One is Until condition evaluates to a true value, the process continues to sleep, which looks

Re: basic and stupid question on wait_event and wake_up

2007-08-13 Thread Ming Liu
Dear Domen, Thanks for your reply first. I understand it this way: - condition Just checking the condition is one way (if you don't have a wake_up source, like an interrupt), but that's not really what wait_event does. It would be something like while (condition) {

Re: basic and stupid question on wait_event and wake_up

2007-08-13 Thread Domen Puncer
On 13/08/07 08:33 +, Ming Liu wrote: Dear Domen, Thanks for your reply first. I understand it this way: - condition Just checking the condition is one way (if you don't have a wake_up source, like an interrupt), but that's not really what wait_event does. It would be something

Re: basic and stupid question on wait_event and wake_up

2007-08-13 Thread Laurent Pinchart
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

Re: basic and stupid question on wait_event and wake_up

2007-08-13 Thread Domen Puncer
On 13/08/07 09: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

Re: basic and stupid question on wait_event and wake_up

2007-08-13 Thread Ming Liu
Thank you so much for your explanation. Now I am quite clear on this topic. Domen, Sorry for my misspelling of your name. That should be Domen not Momen. Sorry for that. :) BR Ming From: Domen Puncer [EMAIL PROTECTED] To: Ming Liu [EMAIL PROTECTED] CC: Linuxppc-embedded@ozlabs.org Subject: