All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/4] sbus/aurora: replace schedule_timeout() with msleep_interruptible()
@ 2005-06-20 21:50 domen
  0 siblings, 0 replies; only message in thread
From: domen @ 2005-06-20 21:50 UTC (permalink / raw)
  To: sparclinux

From: Nishanth Aravamudan <nacc@us.ibm.com>



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>
---
 aurora.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

Index: quilt/drivers/sbus/char/aurora.c
=================================--- quilt.orig/drivers/sbus/char/aurora.c
+++ quilt/drivers/sbus/char/aurora.c
@@ -1515,8 +1515,7 @@ static void aurora_close(struct tty_stru
 		 */
 		timeout = jiffies+HZ;
 		while(port->SRER & SRER_TXEMPTY)  {
-			current->state = TASK_INTERRUPTIBLE;
-			schedule_timeout(port->timeout);
+			msleep_interruptible(jiffies_to_msecs(port->timeout));
 			if (time_after(jiffies, timeout))
 				break;
 		}
@@ -1533,8 +1532,7 @@ static void aurora_close(struct tty_stru
 	port->tty = 0;
 	if (port->blocked_open) {
 		if (port->close_delay) {
-			current->state = TASK_INTERRUPTIBLE;
-			schedule_timeout(port->close_delay);
+			msleep_interruptible(jiffies_to_msecs(port->close_delay));
 		}
 		wake_up_interruptible(&port->open_wait);
 	}

--

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

only message in thread, other threads:[~2005-06-20 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 21:50 [patch 1/4] sbus/aurora: replace schedule_timeout() with msleep_interruptible() domen

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.