From: Ralf Baechle <ralf@oss.sgi.com>
To: Andre.Messerschmidt@infineon.com
Cc: linux-mips@oss.sgi.com
Subject: Re: Wait queue problem
Date: Thu, 18 Apr 2002 18:16:53 -0700 [thread overview]
Message-ID: <20020418181652.A25562@dea.linux-mips.net> (raw)
In-Reply-To: <86048F07C015D311864100902760F1DD01B5E8DD@dlfw003a.dus.infineon.com>; from Andre.Messerschmidt@infineon.com on Wed, Apr 17, 2002 at 12:03:19PM +0200
On Wed, Apr 17, 2002 at 12:03:19PM +0200, Andre.Messerschmidt@infineon.com wrote:
> Does anybody else have problems using wait queues in a 2.4.5 MIPS kernel?
> When I try to wake up a process from an interrupt it won't start to execute.
> It always waits for the timeout before resuming work.
> In principal my code look like this:
>
> wait_queue_head_t wq;
>
> foo() {
> init_waitqueue_head(&wq);
> interruptible_sleep_on_timeout(&wq,10*HZ);
> }
>
> foo_int() {
> wake_up_interuptible(&wq);
> }
>
> Am I missing something?
A bad race condition in that code. If foo_int is called before your process
had a chance to get to sleep it'll never be woken before the timeout.
Ralf
next prev parent reply other threads:[~2002-04-19 1:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-17 10:03 Wait queue problem Andre.Messerschmidt
2002-04-19 1:16 ` Ralf Baechle [this message]
2002-04-19 2:01 ` Richard Hodges
2007-07-20 12:21 ` Misbah khan
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=20020418181652.A25562@dea.linux-mips.net \
--to=ralf@oss.sgi.com \
--cc=Andre.Messerschmidt@infineon.com \
--cc=linux-mips@oss.sgi.com \
/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