Skip to main content

k_obj_core_link

Function k_obj_core_link 

Source
pub unsafe extern "C" fn k_obj_core_link(obj_core: *mut k_obj_core)
Expand description

@brief Register the kernel object with its object type

A kernel object can be optionally registered so that it is reported by k_obj_type_walk_locked() and k_obj_type_walk_unlocked(). It must have been initialized with k_obj_core_init() first. Registering an object that is already registered, or that belongs to the permanent range of its type, has no effect. An object located in the current thread’s stack or in the interrupt stack is not registered and the type’s @a skipped count is incremented. The registry holds no reference inside the object, so an object may be discarded without unregistering it; the stale entry is dropped when its storage is reused or when the registry is full. When the registry is full the object is not registered and the type’s @a dropped count is incremented.

@param obj_core Pointer to the kernel object