1KTHREAD_STOP(9) Driver Basics KTHREAD_STOP(9)
2
3
4
6 kthread_stop - stop a thread created by kthread_create.
7
9 int kthread_stop(struct task_struct * k);
10
12 k
13 thread created by kthread_create.
14
16 Sets kthread_should_stop for k to return true, wakes it, and waits for
17 it to exit. This can also be called after kthread_create instead of
18 calling wake_up_process: the thread will exit without calling threadfn.
19
20 If threadfn may call do_exit itself, the caller must ensure task_struct
21 can't go away.
22
23 Returns the result of threadfn, or -EINTR if wake_up_process was never
24 called.
25
27Kernel Hackers Manual 3.10 June 2019 KTHREAD_STOP(9)