Global

group Global_coreSync

coreSync globals

lorem

Macros

group Macros_coreSync_h

Variables

group Variables_coreSync_h

API’s

group Apis_coreSync_h

Getters

group Getters_coreSync_h

Functions

void coreSync_getBarrier(CosmOS_CoreConfigurationType *core, BitWidthType barrierId)

Set barrier with specific id for core. This function cannot be called from the unprivileged context directly.

The implementation contains obtaining barier variable based on the barrier id argument by the core_getBarrierVar function. Then the state of this barrier variable is set to the BARRIER_STATE_ENUM__REACHED by the coreSync_setBarrierState function. Then we get operating system variable by calling os_getOsCfg function which is later used in os_getOsNumberOfCores function call to get number of cores. Number of synchronized cores is then set to zero and used to obtain the first core configuration by calling os_getCore. Then the barrier variable is obtained by calling core_getBarrierVar. In the implemented while loop we iterate over the all cores and their barriers with specified barrier id. The loop ends if there is only one core configured in the system or if number of synchronized cores is equal to the number of cores.

Parameters
  • core[in] pointer

  • barrierId[in] required barrier id

Returns

none

CosmOS_BarrierStateType coreSync_getBarrierState(CosmOS_BarrierVariableType *barrier)

Setters

group Setters_coreSync_h

Functions

void coreSync_setBarrierState(CosmOS_BarrierVariableType *barrier, CosmOS_BarrierStateType barrierStateParam)

Set barrierState. This function cannot be called from the unprivileged context directly.

Parameters
  • barrier[in] pointer

  • barrierStateParam[in] barrier state

Returns

none

General

group General_coreSync_h

Functions

void coreSync_reactivateBarrier(CosmOS_CoreConfigurationType *core, BitWidthType barrierId)

Reactivate barrier with specific barrierId for core. This function cannot be called from the unprivileged context directly.

The implementation contains reactivation of the scheduler synchronization barriers which are the only barriers that can be currently reactivated. Calling the cosmosAssert function to check if the barrierId is equal to the SCHEDULERS_SYNC_ID and then obtaining barrier variable by calling core_getBarrierVar with the barrier id and setting the barrier variable state by calling coreSync_setBarrierState function with argument BARRIER_STATE_ENUM__ACTIVATED. DEMO

Parameters
  • core[in] pointer

  • barrierId[in] required barrier id

Returns

none