From: Nish Aravamudan <nish.aravamudan@gmail.com>
To: Denis Vlasenko <vda@ilport.com.ua>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Driver writer's guide to sleeping
Date: Mon, 27 Jun 2005 09:04:27 -0700 [thread overview]
Message-ID: <29495f1d05062709041af9f9cd@mail.gmail.com> (raw)
In-Reply-To: <200506251250.18133.vda@ilport.com.ua>
On 6/25/05, Denis Vlasenko <vda@ilport.com.ua> wrote:
> Hi folks,
>
> I'm working on a Linux wireless driver.
>
> I compiled a little guide for myself about waiting primitives.
> I would appreciate if you look thru it. Maybe I'm wrong somewhere.
<snip>
> schedule_timeout(timeout)
<snip>
> msleep(ms)
<snip>
> msleep_interruptible(ms)
<snip>
So, there are four cases in the schedule_timeout() family of sleeps,
based one what you would like to be woken up on:
Signals and Waitqueue events:
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_time_in_jiffies);
Signals only:
msleep_interruptible(some_time_in_msecs);
Waitqueue events only:
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(some_time_in_jiffies);
Neither signals nor waitqueues:
msleep(some_time_in_msecs);
Hopefully that clears some things up.
w.r.t to wait-queue event sleeping, you probably should also be aware
of the wait_event() family of macros.
Thanks,
Nish
prev parent reply other threads:[~2005-06-27 16:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-25 9:50 [RFC] Driver writer's guide to sleeping Denis Vlasenko
2005-06-25 11:29 ` Oliver Neukum
2005-06-25 11:54 ` Denis Vlasenko
2005-06-26 19:38 ` Oliver Neukum
2005-06-27 13:20 ` Denis Vlasenko
2005-06-27 14:56 ` Domen Puncer
2005-06-27 16:04 ` Nish Aravamudan [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=29495f1d05062709041af9f9cd@mail.gmail.com \
--to=nish.aravamudan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vda@ilport.com.ua \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.