void RESUME (PROCESS_ID_TYPE process_id, RETURN_CODE_TYPE *return_code ) { pok_thread_attr_t attr; pok_ret_t core_ret; uint32_t core_process_id = pok_arinc653_processes[process_id]; core_ret = pok_thread_status (core_process_id, &attr); if (core_ret != 0) { *return_code = INVALID_PARAM; return ; } if (attr.state == DORMANT) { *return_code = INVALID_MODE; return ; } if (attr.period == INFINITE_TIME_VALUE) { *return_code = INVALID_MODE; return ; } if (attr.state != WAITING) { *return_code = INVALID_MODE; return ; } core_ret = pok_thread_resume (core_process_id); *return_code = core_ret; }
/******************************************************************** * SERVICE RESUME *********************************************************************/ void RESUME (PROCESS_ID_TYPE /* in*/ PROCESS_ID, RETURN_CODE_TYPE /*out*/ *RETURN_CODE ) { pok_ret_t core_ret; /* Implement required checks */ core_ret = pok_thread_resume (PROCESS_ID); *RETURN_CODE = core_ret; }