ER irot_rdq(PRI tskpri) { QUEUE *p_queue; ER ercd; LOG_IROT_RDQ_ENTER(tskpri); CHECK_INTCTX_UNL(); CHECK_TPRI(tskpri); i_lock_cpu(); p_queue = &(ready_queue[INT_PRIORITY(tskpri)]); if (queue_empty(p_queue)) { ercd = E_OK; } else if ((((TCB *)(p_queue->p_next))->p_tinib->tskatr & TA_RSTR) != 0U) { ercd = E_NOSPT; } else { if (rotate_ready_queue(p_queue)) { reqflg = true; } ercd = E_OK; } i_unlock_cpu(); error_exit: LOG_IROT_RDQ_LEAVE(ercd); return(ercd); }
ER irot_rdq(PRI tskpri) { ER ercd; LOG_IROT_RDQ_ENTER(tskpri); CHECK_INTCTX_UNL(); CHECK_TPRI(tskpri); i_lock_cpu(); if (rotate_ready_queue(INT_PRIORITY(tskpri))) { reqflg = true; } ercd = E_OK; i_unlock_cpu(); error_exit: LOG_IROT_RDQ_LEAVE(ercd); return(ercd); }
ER irot_rdq(PRI tskpri) { ER ercd; PCB *my_p_pcb; LOG_IROT_RDQ_ENTER(tskpri); CHECK_INTCTX_UNL(); CHECK_TPRI(tskpri); i_lock_cpu(); my_p_pcb = i_acquire_tsk_lock_self(); if (rotate_ready_queue(INT_PRIORITY(tskpri), my_p_pcb)) { my_p_pcb->reqflg = true; } ercd = E_OK; release_tsk_lock(my_p_pcb); i_unlock_cpu(); error_exit: LOG_IROT_RDQ_LEAVE(ercd); return(ercd); }