From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: linuxppc-embedded@ozlabs.org
Cc: domen.puncer@telargo.com
Subject: Re: basic and stupid question on wait_event and wake_up
Date: Mon, 13 Aug 2007 11:30:11 +0200 [thread overview]
Message-ID: <200708131130.11871.laurentp@cse-semaphore.com> (raw)
In-Reply-To: <BAY138-F307C7D793CEC734113D325B2DC0@phx.gbl>
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
next prev parent reply other threads:[~2007-08-13 9:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 13:57 basic and stupid question on wait_event and wake_up Ming Liu
2007-08-13 7:54 ` Domen Puncer
2007-08-13 8:33 ` Ming Liu
2007-08-13 8:47 ` Domen Puncer
2007-08-13 9:22 ` Ming Liu
2007-08-13 9:30 ` Laurent Pinchart [this message]
2007-08-13 9:31 ` Domen Puncer
2007-08-13 9:46 ` Ming Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708131130.11871.laurentp@cse-semaphore.com \
--to=laurentp@cse-semaphore.com \
--cc=domen.puncer@telargo.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox