On 2/12/07, topi <topi@xxxxxxxxxxx> wrote:
hi,
<snip> Just FYI:
my code looks like: for (;;) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(X);
schedule_timeout_interruptible() exists now.
set_current_state(TASK_RUNNING);
And this is unnecessary (and adds an unnecessary mb()) since schedule_timeout() guarantees to only return in TASK_RUNNING.
if (signal_pending(current)) break; do_work_here(); }
Thanks, Nish -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/