/*--------------------------------------------------------------------------*/ xme_status_t xme_core_exec_descriptorTable_init( void ) { /* Initialize a critical section to control the access to the task list */ taskDescriptorsMutex = xme_hal_sync_createCriticalSection(); XME_CHECK( XME_HAL_SYNC_INVALID_CRITICAL_SECTION_HANDLE != taskDescriptorsMutex, XME_STATUS_INTERNAL_ERROR); xme_hal_sync_enterCriticalSection(taskDescriptorsMutex); XME_HAL_TABLE_INIT(taskDescriptorsTable); xme_hal_sync_leaveCriticalSection(taskDescriptorsMutex); return XME_STATUS_SUCCESS; }
xme_status_t xme_core_exec_dispatcher_init( void ) { /* Create CPU resource representation */ cpuToken = xme_hal_sync_createCriticalSection(); XME_CHECK( XME_HAL_SYNC_INVALID_CRITICAL_SECTION_HANDLE != cpuToken, XME_STATUS_INTERNAL_ERROR); /* Initially dispatcher owns the resource */ xme_core_exec_lockMutex("CPU/m", cpuToken, (xme_core_component_t)0, (xme_core_component_functionId_t)0); /* Create the descriptor table */ XME_CHECK(XME_STATUS_SUCCESS == xme_core_exec_descriptorTable_init(), XME_STATUS_INTERNAL_ERROR); return XME_STATUS_SUCCESS; }
xme_status_t xme_hal_graphviz_init(void) { if (0 == xme_hal_graphviz_initializationCount) { //Init graphviz; xme_hal_graphviz_gvc = gvContext(); xme_hal_graphviz_mutex = xme_hal_sync_createCriticalSection(); xme_hal_graphviz_initializationCount++; return XME_STATUS_SUCCESS; } else { xme_hal_graphviz_initializationCount++; return XME_STATUS_SUCCESS; } }
xme_status_t configuratorExtension_adv_pnpControlUI_pnpControlUIFunction_init ( configuratorExtension_adv_pnpControlUI_pnpControlUIComponent_config_t* const componentConfig ) { // PROTECTED REGION ID(CONFIGURATOREXTENSION_ADV_PNPCONTROLUI_PNPCONTROLUIFUNCTION_INITIALIZE_C) ENABLED START XME_UNUSED_PARAMETER(componentConfig); commandQueueMutex = xme_hal_sync_createCriticalSection(); XME_HAL_SINGLYLINKEDLIST_INIT(commandQueue); userInputTaskHandle = xme_hal_sched_addTask(0, xme_hal_time_timeIntervalFromSeconds(1u), 0, userInputTask, NULL); return XME_STATUS_SUCCESS; // PROTECTED REGION END }