Reputation: 209
I was wondering how I add a task_struct
to a Wait Queue in a linux kernel module? For example if I want to add a task_struct
called task to a WaitQueue
, what function could I use to achive this?
I understand how to add the current module to a wait queue but I want to add other running processes to a queue, for example if vi was running, I need to add that to a wait queue.
Upvotes: 2
Views: 3252
Reputation: 4098
You can make the current task block on an waitqueue with wait_event*()
functions. See this tutorial, section '6.2.2. Simple Sleeping'.
Upvotes: 3