I have just started programing on Linux kernel threads. I have a problem which I would like to share with you guys. My code is:
/* Wait for kthread_stop */ set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { schedule(); set_current_state(TASK_INTERRUPTIBLE); }
Check this article for more information: "Sleeping in the Kernel".