From: Jeff Garzik <jgarzik@pobox.com>
To: janitor@sternwelten.at
Cc: netdev@oss.sgi.com, nacc@us.ibm.com
Subject: Re: [patch 16/18] net/airo: replace schedule_timeout() with msleep()/msleep_interuptible()
Date: Sun, 31 Oct 2004 06:01:51 -0500 [thread overview]
Message-ID: <4184C61F.2080906@pobox.com> (raw)
In-Reply-To: <E1CO1wE-0002hu-WE@sputnik>
janitor@sternwelten.at wrote:
> Any comments would be appreciated.
>
> Description: Use msleep()/msleep_interruptible() [as appropriate]
> instead of schedule_timeout() to guarantee the task delays as
> expected. Also uses set_current_state() instead of direct assignment of
> current->state in one place.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
>
> ---
>
> linux-2.6.10-rc1-max/drivers/net/wireless/airo.c | 27 ++++++++---------------
> 1 files changed, 10 insertions(+), 17 deletions(-)
>
> diff -puN drivers/net/wireless/airo.c~msleep+msleep_interruptible-drivers_net_wireless_airo drivers/net/wireless/airo.c
> --- linux-2.6.10-rc1/drivers/net/wireless/airo.c~msleep+msleep_interruptible-drivers_net_wireless_airo 2004-10-24 17:05:35.000000000 +0200
> +++ linux-2.6.10-rc1-max/drivers/net/wireless/airo.c 2004-10-24 17:05:35.000000000 +0200
> @@ -1699,9 +1699,8 @@ static int readBSSListRid(struct airo_in
> issuecommand(ai, &cmd, &rsp);
> up(&ai->sem);
> /* Let the command take effect */
> - set_current_state (TASK_INTERRUPTIBLE);
> ai->task = current;
> - schedule_timeout (3*HZ);
> + msleep_interruptible(3*1000);
> ai->task = NULL;
> }
> rc = PC4500_readrid(ai, first ? RID_BSSLISTFIRST : RID_BSSLISTNEXT,
use ssleep() here
> @@ -2950,7 +2947,7 @@ static int airo_thread(void *data) {
> }
> break;
> }
> - current->state = TASK_RUNNING;
> + set_current_state(TASK_RUNNING);
> remove_wait_queue(&ai->thr_wait, &wait);
> locked = 1;
> }
why are you adding barriers?
Jeff
next prev parent reply other threads:[~2004-10-31 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-30 22:43 [patch 16/18] net/airo: replace schedule_timeout() with msleep()/msleep_interuptible() janitor
2004-10-31 11:01 ` Jeff Garzik [this message]
2004-11-01 22:20 ` [PATCH] net/airo: replace schedule_timeout() with *sleep() variants Nishanth Aravamudan
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=4184C61F.2080906@pobox.com \
--to=jgarzik@pobox.com \
--cc=janitor@sternwelten.at \
--cc=nacc@us.ibm.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).