Skip to contentSkip to conversation

s390/ctctty: replace long_delay() with

PATCH New Nishanth Aravamudan 1 participant 2 messages Jul 27, 2004

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/ctctty: replace long_delay() with

I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing

set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_time);

with

msleep(jiffies_to_msecs(some_time));

msleep() is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.

Thanks,
Nish

Applys-to: 2.6.7

Description: Replace schedule_timeout() with msleep() to guarantee the task delays as desired.

drivers/s390/net/ctctty.c +1 -2
@@ -1039,8 +1039,7 @@ ctc_tty_close(struct tty_struct *tty, st
 	info->tty = 0;
 	tty->closing = 0;
 	if (info->blocked_open) {
-		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(HZ/2);
+		msleep(500);
 		wake_up_interruptible(&info->open_wait);
 	}
 	info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

PATCH 1/1 s390/ctctty: replace schedule_timeout()

Wrong subject line.

Quoted 30 lines · Nishanth Aravamudan

I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing

set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_time);

with

msleep(jiffies_to_msecs(some_time));

msleep() is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.

Thanks,
Nish

Applys-to: 2.6.7

Description: Replace schedule_timeout() with msleep() to guarantee the task delays as desired.

drivers/s390/net/ctctty.c ctc_tty_close(struct tty_struct *tty, st · line 1045

Quoted 9 lines
drivers/s390/net/ctctty.c +1 -2
@@ -1039,8 +1039,7 @@ ctc_tty_close(struct tty_struct *tty, st
 	info->tty = 0;
 	tty->closing = 0;
 	if (info->blocked_open) {
-		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(HZ/2);
+		msleep(500);
 		wake_up_interruptible(&info->open_wait);
 	}
 	info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors