Commit cb39d263 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by David S. Miller

[SPARC]: sbus/envctrl: replace schedule_timeout() with msleep_interruptible()

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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70c83375
...@@ -1007,7 +1007,7 @@ static int kenvctrld(void *__unused) ...@@ -1007,7 +1007,7 @@ static int kenvctrld(void *__unused)
return -ENODEV; return -ENODEV;
} }
poll_interval = 5 * HZ; /* TODO env_mon_interval */ poll_interval = 5000; /* TODO env_mon_interval */
daemonize("kenvctrld"); daemonize("kenvctrld");
allow_signal(SIGKILL); allow_signal(SIGKILL);
...@@ -1016,10 +1016,7 @@ static int kenvctrld(void *__unused) ...@@ -1016,10 +1016,7 @@ static int kenvctrld(void *__unused)
printk(KERN_INFO "envctrl: %s starting...\n", current->comm); printk(KERN_INFO "envctrl: %s starting...\n", current->comm);
for (;;) { for (;;) {
current->state = TASK_INTERRUPTIBLE; if(msleep_interruptible(poll_interval))
schedule_timeout(poll_interval);
if(signal_pending(current))
break; break;
for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) { for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment