Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
#include <zephyr/sys_clock.h>
Go to the source code of this file.
Functions | |
int | arc_vpx_lock (k_timeout_t timeout) |
Obtain a cooperative lock on the VPX vector registers. | |
void | arc_vpx_unlock (void) |
Release cooperative lock on the VPX vector registers. | |
void | arc_vpx_unlock_force (unsigned int cpu_id) |
Release cooperative lock on a CPU's VPX vector registers. | |
int arc_vpx_lock | ( | k_timeout_t | timeout | ) |
Obtain a cooperative lock on the VPX vector registers.
This function is used to obtain a cooperative lock on the current CPU's VPX vector registers before the calling thread uses them. Callers attempting to obtain the cooperative lock must be already restricted to executing on a single CPU, and continue to execute on that same CPU while both waiting and holding the lock.
This routine is not callable from an ISR.
timeout | Waiting period to obtain the lock, or one of the special values K_NO_WAIT and K_FOREVER. |
void arc_vpx_unlock | ( | void | ) |
Release cooperative lock on the VPX vector registers.
This function is used to release the cooperative lock on the current CPU's VPX vector registers. It is called after the current thread no longer needs to use the VPX vector registers, thereby allowing another thread to use them.
This routine is not callable from an ISR.
void arc_vpx_unlock_force | ( | unsigned int | cpu_id | ) |
Release cooperative lock on a CPU's VPX vector registers.
This function is used to release the cooperative lock on the specified CPU's VPX vector registers. This routine should not be used except by a system monitor to release the cooperative lock in case the locking thread where it is known that the locking thread is unable to release it (e.g. it was aborted while holding the lock).
cpu_id | CPU ID of the VPX vector register set to be unlocked |