예제 #1
0
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);
}
예제 #2
0
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);
}
예제 #3
0
파일: alarm.c 프로젝트: inouema/toppers
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;
}