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 for the desired time.
Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
--- linux-vanilla/drivers/isdn/hysdn/boardergo.c 2004-06-16
05:19:26.000000000 +0000
+++ linux-dev/drivers/isdn/hysdn/boardergo.c 2004-07-12 18:07:54.000000000
+0000
@@ -246,8 +246,7 @@ ergo_writebootimg(struct HYSDN_CARD *car
/* the interrupts are still masked */
sti();
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout((20 * HZ) / 1000); /* Timeout 20ms */
+ msleep(20);
if (((tDpramBootSpooler *) card->dpram)->Len !=
DPRAM_SPOOLER_DATA_SIZE) {
if (card->debug_flags & LOG_POF_CARD)
@@ -386,8 +385,7 @@ ergo_waitpofready(struct HYSDN_CARD *car
return (0); /* success */
} /* data has arrived */
sti();
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout((50 * HZ) / 1000); /* Timeout 50ms */
+ msleep(50);
} /* wait until timeout */
if (card->debug_flags & LOG_POF_CARD)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
|