pub unsafe extern "C" fn k_spin_trylock(
l: *mut k_spinlock,
k: *mut z_spinlock_key,
) -> i32
Expand description
@brief Attempt to lock a spinlock
This routine makes one attempt to lock @p l. If it is successful, then it will store the key into @p k.
@param[in] l A pointer to the spinlock to lock @param[out] k A pointer to the spinlock key @retval 0 on success @retval -EBUSY if another thread holds the lock
@see k_spin_lock @see k_spin_unlock