Global¶
- group Global_CILspinlock
CILspinlock globals.
lorem
Macros¶
- group Macros_CILspinlock_h
Variables¶
- group Variables_CILspinlock_h
API’s¶
- group Apis_CILspinlock_h
Getters¶
- group Getters_CILspinlock_h
Setters¶
- group Setters_CILspinlock_h
General¶
- group General_CILspinlock_h
Functions
-
CosmOS_SpinlockStateType CILspinlock_trySpinlock(AddressType *spinlockPointer, BitWidthType spinlockId, BitWidthType schedulableId)¶
Try to get spinlock. This function cannot be called from the unprivileged context directly. DEMO.
The implementation contains function HAL_HSEM_Take call intended to take hardware semaphore based on the spinlock identifier and schedulable unique identifier. If the hsemTakeStatus is equal to the the value 1 is loaded to the spinlock address and spinlockState is set to the SPINLOCK_STATE_ENUM__SUCCESSFULLY_LOCKED. Otherwise is spinlockState set to the SPINLOCK_STATE_ENUM__OCCUPIED. In the end is the spinlockState returned from the function.
- Parameters
spinlockPointer – [in] pointer to the spinlock variable that stores spinlock value
spinlockId – [in]
schedulableId –
- Returns
CosmOS_SpinlockStateType
-
CosmOS_SpinlockStateType CILspinlock_releaseSpinlock(AddressType *spinlockPointer, BitWidthType spinlockId, BitWidthType schedulableId)¶
Release spinlock. This function cannot be called from the unprivileged context directly. DEMO.
The implementation contains function HAL_HSEM_Release call intended to release hardware semaphore based on the spinlock identifier and schedulable unique identifier. Then the value 0 is loaded to the spinlock address and spinlockState is set to the SPINLOCK_STATE_ENUM__RELEASED and returned from the function.
- Parameters
spinlockPointer – [in] pointer to the spinlock variable that stores spinlock value
spinlockId – [in]
schedulableId –
- Returns
CosmOS_SpinlockStateType
-
CosmOS_SpinlockStateType CILspinlock_trySpinlock(AddressType *spinlockPointer, BitWidthType spinlockId, BitWidthType schedulableId)¶