static int worker_thread(void *__cwq) { struct cpu_workqueue_struct *cwq = __cwq; DEFINE_WAIT(wait);
if (cwq->wq->freezeable) set_freezable();
for (;;) { prepare_to_wait(&cwq->more_work, &wait, TASK_INTERRUPTIBLE);
if (!freezing(current) && !kthread_should_stop() && list_empty(&cwq->worklist)) schedule(); finish_wait(&cwq->more_work, &wait);
try_to_freeze();
if (kthread_should_stop()) break; run_workqueue(cwq);
} return 0; }