pub unsafe extern "C" fn k_thread_suspend(thread: *mut k_thread)
Expand description
@brief Suspend a thread.
This routine prevents the kernel scheduler from making @a thread the current thread. All other internal operations on @a thread are still performed; for example, kernel objects it is waiting on are still handed to it. Thread suspension does not impact any timeout upon which the thread may be waiting (such as a timeout from a call to k_sem_take() or k_sleep()). Thus if the timeout expires while the thread is suspended, it is still suspended until k_thread_resume() is called.
When the target thread is active on another CPU, the caller will block until the target thread is halted (suspended or aborted). But if the caller is in an interrupt context, it will spin waiting for that target thread active on another CPU to halt.
If @a thread is already suspended, the routine has no effect.
@param thread ID of thread to suspend.