linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 07/11] tc/zs: replace schedule_timeout() with msleep_interruptible()
@ 2005-01-11 23:35 domen
  0 siblings, 0 replies; only message in thread
From: domen @ 2005-01-11 23:35 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, domen, nacc, janitor




Any comments would be appreciated.

Description: 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-01-10 18:00:13.000000000 +0100
+++ kj-domen/drivers/tc/zs.c	2005-01-10 18:00:13.000000000 +0100
@@ -1395,8 +1395,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);
 	}
@@ -1429,8 +1428,7 @@ static void rs_wait_until_sent(struct tt
 	if (timeout)
 		char_time = min_t(unsigned long, 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))
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-11 23:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11 23:35 [patch 07/11] tc/zs: replace schedule_timeout() with msleep_interruptible() domen

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).