KTHREAD_STOP(9) Driver Basics KTHREAD_STOP(9)NAMEkthread_stop - stop a thread created by kthread_create.
SYNOPSIS
int kthread_stop(struct task_struct * k);
ARGUMENTS
k
thread created by kthread_create.
DESCRIPTION
Sets kthread_should_stop for k to return true, wakes it, and waits for
it to exit. This can also be called after kthread_create instead of
calling wake_up_process: the thread will exit without calling threadfn.
If threadfn may call do_exit itself, the caller must ensure task_struct
canĀ“t go away.
Returns the result of threadfn, or -EINTR if wake_up_process was never
called.
COPYRIGHTKernel Hackers Manual 2.6. November 2013 KTHREAD_STOP(9)