linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Wait queue question
@ 2001-02-14 15:05 Ralph Blach
  2001-02-14 17:30 ` Roland Dreier
  2001-02-14 18:34 ` Ron Bianco
  0 siblings, 2 replies; 6+ messages in thread
From: Ralph Blach @ 2001-02-14 15:05 UTC (permalink / raw)
  To: Embedded Linux list

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

If I have a wait queue thats I am using to wake up a device driver read
from an interrupt service routine.
If I get three interrupt and three wake_up_interrables, will I need to
execute three sleep_ons to get the wait queue back to the null state, or
is it just back after the first sleep_on?

Chip

[-- Attachment #2: Card for Ralph Blach --]
[-- Type: text/x-vcard, Size: 247 bytes --]

begin:vcard
n:Blach;Ralph
tel;work:919-543-1207
x-mozilla-html:TRUE
url:www.ibm.com
org:IBM MicroElectronics
adr:;;3039 Cornwallis		;RTP;NC;27709;USA
version:2.1
email;internet:rcblach@raleigh.ibm.com
x-mozilla-cpt:;15936
fn:Ralph Blach
end:vcard

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Wait queue question
@ 2001-02-14 18:04 Ian Abbott
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2001-02-14 18:04 UTC (permalink / raw)
  To: Embedded Linux list


Ralph Blach wrote:

> If I have a wait queue thats I am using to wake up a device
> driver read
> from an interrupt service routine.
> If I get three interrupt and three wake_up_interrables, will I need to
> execute three sleep_ons to get the wait queue back to the
> null state, or
> is it just back after the first sleep_on?

They do not work like semaphores. wake_up and wake_up_interruptible have
an immediate effect on processes waiting on the specified queue, but
don't modify a counter or anything like that. This also means you can't
sleep on an event that has already happened, like you could with a
semaphore.

Also, you probably want to use interruptible_sleep_on rather than
sleep_on, unless you've already considered this.

These are general Linux driver writing questions, rather than embedded
Linux PPC questions. You may be better off addressing these sorts of
questions to a different list or newsgroup. Also, you may wish to
consider investing in Alessandro Rubini's "Linux Device Drivers",
published by O'Reilly. It's starting to get a little out-of-date in
places but is still a good introduction to writing device drivers for
Linux.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-02-15 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-14 15:05 Wait queue question Ralph Blach
2001-02-14 17:30 ` Roland Dreier
2001-02-15 13:59   ` Ralph Blach
2001-02-15 16:39     ` Roland Dreier
2001-02-14 18:34 ` Ron Bianco
  -- strict thread matches above, loose matches on Subject: below --
2001-02-14 18:04 Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).