SPRUIL1D May 2019 ā December 2024 DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1
This procedure configures the take and release (free) operations for the Spinlock module. A spinlock should only be held with interrupts disabled. So, before attempting to obtain the spinlock, software must disable interrupts. Then it must read the SPINLOCK_LOCK_REG_y[0] TAKEN bit to attempt to obtain the lock. If it succeeds, it must proceed directly through the critical section then unlock and re-enable interrupts. If the acquisition attempt fails, the acquisition must be reattempted. To prevent unknown interrupt disabled time, interrupts must be re-enabled and then disabled before reattempting to acquire the lock. Figure 7-7 shows the described above procedure.
Figure 7-7 Take and Release Spinlock| Register Name |
|---|
| SPINLOCK_LOCK_REG_y[0] TAKEN |
| Subprocess Name | Description |
|---|---|
| Disable (Mask) All Interrupts | For information about disabling/enabling all interrupts in an
ArmĀ® processor, refer to Arm Technical Reference Manual, available at infocenter.arm.com/help/index.jsp. For information about disabling/enabling all interrupts in other processors, refer to the corresponding processor chapter. |
| Enable (Unmask) All Interrupts |