zephyr::raw

Function k_sched_current_thread_query

source
pub unsafe extern "C" fn k_sched_current_thread_query() -> *mut k_thread
Expand description

@brief Query thread ID of the current thread.

This unconditionally queries the kernel via a system call.

@note Use k_current_get() unless absolutely sure this is necessary. This should only be used directly where the thread local variable cannot be used or may contain invalid values if thread local storage (TLS) is enabled. If TLS is not enabled, this is the same as k_current_get().

@return ID of current thread.