From: domen@coderock.org
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org,
nacc@us.ibm.com, janitor@sternwelten.at
Subject: [patch 09/14] tc/zs: replace schedule_timeout() with msleep_interruptible()
Date: Sun, 06 Mar 2005 23:36:43 +0100 [thread overview]
Message-ID: <20050306223643.D1CBA1ED3D@trashy.coderock.org> (raw)
Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/drivers/tc/zs.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -puN drivers/tc/zs.c~msleep_interruptible-drivers_tc_zs drivers/tc/zs.c
--- kj/drivers/tc/zs.c~msleep_interruptible-drivers_tc_zs 2005-03-05 16:09:39.000000000 +0100
+++ kj-domen/drivers/tc/zs.c 2005-03-05 16:09:39.000000000 +0100
@@ -1368,8 +1368,7 @@ static void rs_close(struct tty_struct *
info->tty = 0;
if (info->blocked_open) {
if (info->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(info->close_delay);
+ msleep_interruptible(jiffies_to_msecs(info->close_delay));
}
wake_up_interruptible(&info->open_wait);
}
@@ -1403,8 +1402,7 @@ static void rs_wait_until_sent(struct tt
if (timeout)
char_time = min(char_time, timeout);
while ((read_zsreg(info->zs_channel, 1) & Tx_BUF_EMP) == 0) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(char_time);
+ msleep_interruptible(jiffies_to_msecs(char_time));
if (signal_pending(current))
break;
if (timeout && time_after(jiffies, orig_jiffies + timeout))
_
reply other threads:[~2005-03-06 23:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050306223643.D1CBA1ED3D@trashy.coderock.org \
--to=domen@coderock.org \
--cc=akpm@osdl.org \
--cc=janitor@sternwelten.at \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.ibm.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