void qPut( Q_HEAD *pQHead, Q_NODE *pQNode, unsigned long key ) { Q_PUT(pQHead, pQNode, key); }
void qPut ( Q_HEAD *pQHead, Q_NODE *pQNode, ULONG key ) { Q_PUT (pQHead, pQNode, key); }
STATUS taskDelay( unsigned timeout ) { STATUS status; if (INT_RESTRICT() != OK) { errnoSet(S_intLib_NOT_ISR_CALLABLE); status = ERROR; } else { /* Enter kernel mode */ kernelState = TRUE; /* If no wait, then just re-insert it */ if (timeout == WAIT_NONE) { Q_REMOVE(&readyQHead, taskIdCurrent); Q_PUT(&readyQHead, taskIdCurrent, taskIdCurrent->priority); } else { /* Put to sleep */ vmxDelay(timeout); } /* Exit trough kernel, and check for error */ if ((status = vmxExit()) == SIG_RESTART) { status = ERROR; } } return status; }
STATUS semQueuePendQPut ( FAST Q_HEAD *pQHead, /* pend queue to put taskIdCurrent on */ FAST int timeout, /* timeout in ticks */ struct osl_wait_data* entry ) { FAST WIND_TCB *pTcbCurrent = _WRS_KERNEL_GLOBAL_ACCESS (taskIdCurrent); entry->task = pTcbCurrent; /*lint -restore +e101*/ #ifdef _WRS_CONFIG_RTP /* For RTP task, check for pending signals if pQHead is interruptible */ /*lint -save -e18*/ if ((pQHead->qPriv2 & QUEUE_INTERRUPTIBLE) == QUEUE_INTERRUPTIBLE) { if (_func_rtpTaskSigCheck && _func_rtpTaskSigCheck(pTcbCurrent) == OK) { errno = EINTR; return (ERROR); } } /*lint -restore +e18*/ #endif /* _WRS_CONFIG_RTP */ #ifdef _WRS_CONFIG_SV_INSTRUMENTATION /* system viewer - level 2 event logging */ EVT_TASK_0 (EVENT_WINDPENDQPUT); /* log event */ #endif /* _WRS_CONFIG_SV_INSTRUMENTATION */ READY_Q_REMOVE (pTcbCurrent); /* out of ready q */ pTcbCurrent->status |= WIND_PEND; /* update status */ pTcbCurrent->pPendQ = pQHead; /* pQHead pended on */ Q_PUT (pQHead, QUEUE_PENDQ_NODE_PTR (entry), pTcbCurrent->priority); if (timeout != WAIT_FOREVER) /* timeout specified? */ {/*lint --e{564} */ if ((UINT64)(vxAbsTicks + timeout) < vxAbsTicks) /* rollover? *//*lint !e737*/ { windCalibrateTickQ (); /* reset delays *//*lint !e718*/ #ifdef _WRS_CONFIG_SMP vxAbsTicksZero (); #else vxAbsTicks = 0; #endif /* _WRS_CONFIG_SMP */ } /* * Set the finish time of the delay for the task. This is used to * facilitate recalculation of timeouts on RESTART. */ TASK_CPUTIME_INFO_SET (pTcbCurrent, 0, (vxAbsTicks + timeout));/*lint !e737*/ Q_PUT (&tickQHead, &pTcbCurrent->tickNode, timeout); pTcbCurrent->status |= WIND_DELAY; } /*lint -restore +e409*/ return (OK); }/*lint !e550*/