ER stp_alm(ID almid) { ALMCB *p_almcb; ER ercd; LOG_STP_ALM_ENTER(almid); CHECK_TSKCTX_UNL(); CHECK_ALMID(almid); p_almcb = get_almcb(almid); t_lock_cpu(); if (p_almcb->p_alminib->almatr == TA_NOEXS) { ercd = E_NOEXS; } else if (p_almcb->almsta) { p_almcb->almsta = false; tmevtb_dequeue(&(p_almcb->tmevtb)); } ercd = E_OK; t_unlock_cpu(); error_exit: LOG_STP_ALM_LEAVE(ercd); return(ercd); }
ER stp_alm(ID almid) { ALMCB *p_almcb; ER ercd; LOG_STP_ALM_ENTER(almid); CHECK_UNL(); CHECK_ID(VALID_ALMID(almid)); p_almcb = get_almcb(almid); lock_cpu(); if (p_almcb->almsta) { p_almcb->almsta = false; tmevtb_dequeue(&(p_almcb->tmevtb)); } ercd = E_OK; unlock_cpu(); error_exit: LOG_STP_ALM_LEAVE(ercd); return(ercd); }
ER stp_alm(ID almid) { ER ercd; uint_t index = INDEX_ALM(almid); LOG_STP_ALM_ENTER(almid); CHECK_TSKCTX_UNL(); CHECK_ALMID(almid); t_lock_cpu(); if((almcb_almact & ALMACT_BIT(index)) != 0U) { almcb_almact &= ~ALMACT_BIT(index); time_event_dequeue(ALM_EVTID(almid)); } ercd = E_OK; t_unlock_cpu(); error_exit: LOG_STP_ALM_LEAVE(ercd); return ercd; }