Skip to content

Commit

Permalink
[SPARC]: sbus/envctrl: replace schedule_timeout() with msleep_interru…
Browse files Browse the repository at this point in the history
…ptible()

Use msleep_interruptible() instead of schedule_timeout() to guarantee
the task delays as expected. Change the units of poll_interval to
msecs as it is only used in this delay.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nishanth Aravamudan authored and David S. Miller committed Jul 25, 2005
1 parent 70c8337 commit cb39d26
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/sbus/char/envctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ static int kenvctrld(void *__unused)
return -ENODEV;
}

poll_interval = 5 * HZ; /* TODO env_mon_interval */
poll_interval = 5000; /* TODO env_mon_interval */

daemonize("kenvctrld");
allow_signal(SIGKILL);
Expand All @@ -1016,10 +1016,7 @@ static int kenvctrld(void *__unused)

printk(KERN_INFO "envctrl: %s starting...\n", current->comm);
for (;;) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(poll_interval);

if(signal_pending(current))
if(msleep_interruptible(poll_interval))
break;

for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) {
Expand Down

0 comments on commit cb39d26

Please sign in to comment.