From: Steve French <smfltc@us.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: Re: missing wait_event_timeout
Date: 24 Aug 2004 17:23:19 -0500 [thread overview]
Message-ID: <1093386199.4882.11.camel@stevef95.austin.ibm.com> (raw)
In-Reply-To: <1093383090.4871.8.camel@stevef95.austin.ibm.com>
Maybe it is just safer to call wait_event with the timeout check as one
of the conditions?
On Tue, 2004-08-24 at 16:31, Steve French wrote:
> Is there a reason why there is no wait_event_timeout function in kernel.
> There is only the __wait_event_timeout_interruptible in wait.h
> It seems the easiest way to fix the few remaining pieces of code which
> call the deprecated sleep_on_timeout.
>
> ie something like:
>
>
> > #define __wait_event_timeout(wq, condition, ret)
> > do {
> > DEFINE_WAIT(__wait);
> >
> > for (;;) {
> > prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE);
> > if (condition)
> > break;
> > ret = schedule_timeout(ret);
> > if (!ret)
> > break;
> > }
> > finish_wait(&wq, &__wait);
> > } while (0)
>
>
prev parent reply other threads:[~2004-08-24 22:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-24 21:31 Steve French
2004-08-24 22:23 ` Steve French [this message]
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=1093386199.4882.11.camel@stevef95.austin.ibm.com \
--to=smfltc@us.ibm.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®