BOOL wait_release(TCB *tcb) { wait_cancel(tcb); tcb->winfo->wercd = E_RLWAI; return(make_non_wait(tcb)); }
bool_t wait_complete(TCB *p_tcb) { wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_OK; return(make_non_wait(p_tcb)); }
void mutex_release(MTXCB *p_mtxcb) { TCB *p_tcb; if (queue_empty(&(p_mtxcb->wait_queue))) { p_mtxcb->p_loctsk = NULL; } else { /* * ミューテックス待ちキューの先頭タスク(p_tcb)に,ミューテッ * クスをロックさせる. */ p_tcb = (TCB *) queue_delete_next(&(p_mtxcb->wait_queue)); wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_OK; p_mtxcb->p_loctsk = p_tcb; p_mtxcb->p_prevmtx = p_tcb->p_lastmtx; p_tcb->p_lastmtx = p_mtxcb; if (MTX_CEILING(p_mtxcb)) { if (p_mtxcb->p_mtxinib->ceilpri < p_tcb->priority) { p_tcb->priority = p_mtxcb->p_mtxinib->ceilpri; } } make_non_wait(p_tcb); } }
void wait_complete(TCB *p_tcb) { wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_OK; make_non_wait(p_tcb); }
bool_t wait_release(TCB *p_tcb) { wait_dequeue_wobj(p_tcb); wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_RLWAI; return(make_non_wait(p_tcb)); }
void wait_tmout_ok(TCB *tcb) { tcb->winfo->wercd = E_OK; if (make_non_wait(tcb)) { reqflg = TRUE; } }
BOOL wait_complete(TCB *tcb) { if (tcb->winfo->tmevtb != NULL) { tmevtb_dequeue(tcb->winfo->tmevtb); } tcb->winfo->wercd = E_OK; return(make_non_wait(tcb)); }
void wait_tmout(TCB *tcb) { if ((tcb->tstat & TS_WAIT_WOBJ) != 0) { queue_delete(&(tcb->task_queue)); } tcb->winfo->wercd = E_TMOUT; if (make_non_wait(tcb)) { reqflg = TRUE; } }
void init_wait_queue(QUEUE *p_wait_queue) { TCB *p_tcb; while (!queue_empty(p_wait_queue)) { p_tcb = (TCB *) queue_delete_next(p_wait_queue); wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_DLT; make_non_wait(p_tcb); } }
void wait_tmout_ok(TCB *p_tcb) { p_tcb->p_winfo->wercd = E_OK; if (make_non_wait(p_tcb)) { reqflg = true; } /* * ここで優先度の高い割込みを受け付ける. */ i_unlock_cpu(); i_lock_cpu(); }
void wait_tmout(TCB *p_tcb) { wait_dequeue_wobj(p_tcb); p_tcb->p_winfo->wercd = E_TMOUT; if (make_non_wait(p_tcb)) { reqflg = true; } /* * ここで優先度の高い割込みを受け付ける. */ i_unlock_cpu(); i_lock_cpu(); }
bool_t init_wait_queue(QUEUE *p_wait_queue) { TCB *p_tcb; bool_t dspreq = false; while (!queue_empty(p_wait_queue)) { p_tcb = (TCB *) queue_delete_next(p_wait_queue); wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_DLT; if (make_non_wait(p_tcb)) { dspreq = true; }; } return(dspreq); }
void wait_tmout_ok(TCB *p_tcb) { p_tcb->p_winfo->wercd = E_OK; make_non_wait(p_tcb); if (p_runtsk != p_schedtsk) { request_dispatch_retint(); } /* * ここで優先度の高い割込みを受け付ける. */ unlock_cpu(); delay_for_interrupt(); lock_cpu(); }
void wait_tmout(TCB *p_tcb) { wait_dequeue_wobj(p_tcb); p_tcb->p_winfo->wercd = E_TMOUT; make_non_wait(p_tcb); if (p_runtsk != p_schedtsk) { request_dispatch(); } /* * ここで優先度の高い割込みを受け付ける. */ unlock_cpu(); delay_for_interrupt(); lock_cpu(); }
ER rel_wai(ID tskid) { TCB *p_tcb; ER ercd; LOG_REL_WAI_ENTER(tskid); CHECK_UNL(); CHECK_ID(VALID_TSKID(tskid)); p_tcb = get_tcb(tskid); lock_cpu(); if (p_tcb->p_tinib->tskatr == TA_NOEXS) { ercd = E_NOEXS; } else if (!TSTAT_WAITING(p_tcb->tstat)) { ercd = E_OBJ; } else { wait_dequeue_wobj(p_tcb); wait_dequeue_tmevtb(p_tcb); p_tcb->p_winfo->wercd = E_RLWAI; make_non_wait(p_tcb); if (p_runtsk != p_schedtsk) { if (!sense_context()) { dispatch(); } else { request_dispatch(); } } ercd = E_OK; } unlock_cpu(); error_exit: LOG_REL_WAI_LEAVE(ercd); return(ercd); }