kthread_stop(9)

kthread_stop9

Stop a thread created by kthread_create.

Usage

int kthread_stop(struct task_struct * k);

Arguments

k

thread created by kthread_create.

Overview

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.

Releases

5 releases since Debian 4.0 (Etch); the text changed 4 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.