Global

group Global_CILsemaphore

CILsemaphore globals.

lorem

Macros

group Macros_CILsemaphore_h

Variables

group Variables_CILsemaphore_h

API’s

group Apis_CILsemaphore_h

Getters

group Getters_CILsemaphore_h

Setters

group Setters_CILsemaphore_h

General

group General_CILsemaphore_h

Functions

CosmOS_SemaphoreStateType CILsemaphore_trySemaphore(AddressType *semaphorePointer, BitWidthType semaphoreId, BitWidthType schedulableId)

Try to get semaphore. 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 semaphore identifier and schedulable unique identifier. If the hsemTakeStatus is equal to the the value 1 is loaded to the semaphore address and semaphoreState is set to the SEMAPHORE_STATE_ENUM__SUCCESSFULLY_LOCKED. Otherwise is semaphoreState set to the SEMAPHORE_STATE_ENUM__OCCUPIED. In the end is the semaphoreState returned from the function.

Parameters
  • semaphorePointer[in] pointer to the semaphore variable that stores semaphore value

  • semaphoreId[in]

  • schedulableId

Returns

CosmOS_SemaphoreStateType

CosmOS_SemaphoreStateType CILsemaphore_releaseSemaphore(AddressType *semaphorePointer, BitWidthType semaphoreId, BitWidthType schedulableId)

Release semaphore. 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 semaphore identifier and schedulable unique identifier. Then the value 0 is loaded to the semaphore address and semaphoreState is set to the SEMAPHORE_STATE_ENUM__RELEASED and returned from the function.

Parameters
  • semaphorePointer[in] pointer to the semaphore variable that stores semaphore value

  • semaphoreId[in]

  • schedulableId

Returns

CosmOS_SemaphoreStateType