Is is intentional that tummy_task is not initialized? Ok, it won't crash because the current __run_task_queue() implementation doesn't call tq->routine if it's NULL, but IMHO it's ugly. Additionally I don't like the loop in flush_scheduled_tasks(), what about replacing it with a locked semaphore (same idea as vfork)? I've attched an untested patch. -- Manfred