pub unsafe extern "C" fn k_spin_unlock(
l: *mut k_spinlock,
key: z_spinlock_key,
)
Expand description
@brief Unlock a spin lock
This releases a lock acquired by k_spin_lock(). After this function is called, any CPU will be able to acquire the lock. If other CPUs are currently spinning inside k_spin_lock() waiting for this lock, exactly one of them will return synchronously with the lock held.
Spin locks must be properly nested. A call to k_spin_unlock() must be made on the lock object most recently locked using k_spin_lock(), using the key value that it returned. Attempts to unlock mis-nested locks, or to unlock locks that are not held, or to passing a key parameter other than the one returned from k_spin_lock(), are illegal. When CONFIG_SPIN_VALIDATE is set, some of these errors can be detected by the framework.
@param l A pointer to the spinlock to release @param key The value returned from k_spin_lock() when this lock was acquired