mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-24 10:25:31 +08:00
Replace schedule_work with queue_work
schedule_work adds work to global workqueue. In this example, we create a local workqueue. Use the local workqueue by calling queue_work(), instead of putting work on the global workqueue.
This commit is contained in:
parent
b99354a02f
commit
a49c9baffa
|
@ -17,7 +17,7 @@ static int __init sched_init(void)
|
|||
{
|
||||
queue = alloc_workqueue("HELLOWORLD", WQ_UNBOUND, 1);
|
||||
INIT_WORK(&work, work_handler);
|
||||
schedule_work(&work);
|
||||
queue_work(queue, &work);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user