lkml.org 
[lkml]   [2006]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 1/15] EDAC: switch to kthread_ API
Dave Peterson <dsp@llnl.gov> wrote:
>
> schedule_timeout((HZ * poll_msec) / 1000);
> try_to_freeze();
> + __set_current_state(TASK_RUNNING);

schedule() and schedule_timeout*() always return in state TASK_RUNNING, so
I'll take that out of there.

We might as well use schedule_timeout_interruptible(), too. As a bonus, we
get to delete that spelling mistake ;)


--- devel/drivers/edac/edac_mc.c~edac-switch-to-kthread_-api-tidy 2006-03-02 18:27:56.000000000 -0800
+++ devel-akpm/drivers/edac/edac_mc.c 2006-03-02 18:27:56.000000000 -0800
@@ -2042,13 +2042,9 @@ static int edac_kernel_thread(void *arg)
while (!kthread_should_stop()) {
do_edac_check();

- /* ensure we are interruptable */
- set_current_state(TASK_INTERRUPTIBLE);
-
/* goto sleep for the interval */
- schedule_timeout((HZ * poll_msec) / 1000);
+ schedule_timeout_interruptible((HZ * poll_msec) / 1000);
try_to_freeze();
- __set_current_state(TASK_RUNNING);
}

return 0;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-03 03:35    [W:0.042 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site