LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Embedded Linux list <linuxppc-embedded@lists.linuxppc.org>
Subject: RE: Wait queue question
Date: Wed, 14 Feb 2001 18:04:07 -0000	[thread overview]
Message-ID: <00933BFA237CD2119B3400409543582704A2BA@MEV01> (raw)


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/

             reply	other threads:[~2001-02-14 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-14 18:04 Ian Abbott [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=00933BFA237CD2119B3400409543582704A2BA@MEV01 \
    --to=abbotti@mev.co.uk \
    --cc=linuxppc-embedded@lists.linuxppc.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