zephyr::raw

Function k_thread_abort

source
pub unsafe extern "C" fn k_thread_abort(thread: *mut k_thread)
Expand description

@brief Abort a thread.

This routine permanently stops execution of @a thread. The thread is taken off all kernel queues it is part of (i.e. the ready queue, the timeout queue, or a kernel object wait queue). However, any kernel resources the thread might currently own (such as mutexes or memory blocks) are not released. It is the responsibility of the caller of this routine to ensure all necessary cleanup is performed.

After k_thread_abort() returns, the thread is guaranteed not to be running or to become runnable anywhere on the system. Normally this is done via blocking the caller (in the same manner as k_thread_join()), but in interrupt context on SMP systems the implementation is required to spin for threads that are running on other CPUs.

@param thread ID of thread to abort.