亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? msgqlib.c

?? VxWorks BSP框架源代碼包含頭文件和驅(qū)動
?? C
?? 第 1 頁 / 共 2 頁
字號:
    if (ID_IS_SHARED (msgQId))  		/* message Q is shared?*/	{		if (ID_IS_DISTRIBUTED (msgQId)) /* message queue is distributed? */			{			errno = S_distLib_NO_OBJECT_DESTROY;		 	return (ERROR);             /* cannot delete distributed msgQ */			}			errno = S_smObjLib_NO_OBJECT_DESTROY;        return (ERROR);				/* cannot delete sm. msgQ */	}    if (INT_RESTRICT () != OK)			/* restrict isr use */	return (ERROR);    TASK_SAFE ();				/* TASK SAFE */    TASK_LOCK ();				/* LOCK PREEMPTION */#ifdef WV_INSTRUMENTATION    /* Indicate that msgQDelete has been initiated */    /* windview - level 1 event logging routine */    EVT_OBJ_1 (OBJ, msgQId, msgQClassId, EVENT_MSGQDELETE, msgQId);#endif    if (OBJ_VERIFY (msgQId, msgQClassId) != OK)	/* validate message queue id */	{	TASK_UNLOCK ();				/* UNLOCK PREEMPTION */	TASK_UNSAFE ();				/* TASK UNSAFE */	return (ERROR);	}    objCoreTerminate (&msgQId->objCore);	/* INVALIDATE */#ifdef WV_INSTRUMENTATION    /*  Indicate that the msgQDelete has succeeded (before TASK_UNLOCK, as     *  that causes unnecessary WV parser confusion).     */    /* windview - level 2 instrumentation     * EVENT_OBJ_MSGDELETE needs to return the msgQId so MSG_OFFSET is     * used to calulate the msgQId from the pQHead     */    EVT_TASK_1 (EVENT_OBJ_MSGDELETE, msgQId);#endif    TASK_UNLOCK ();				/* UNLOCK PREEMPTION */    /* gobble up all messages in the message and free queues */    timeout = NO_WAIT;		/* first time through gobble without waiting */    nMsgs = 0;    errnoCopy = errnoGet ();    while (nMsgs < msgQId->maxMsgs)	{	while (((pNode = qJobGet (msgQId, &msgQId->freeQ, timeout)) != NULL) &&	       (pNode != (Q_JOB_NODE *) NONE))	    nMsgs++;	while (((pNode = qJobGet (msgQId, &msgQId->msgQ, timeout)) != NULL) &&	       (pNode != (Q_JOB_NODE *) NONE))	    nMsgs++;	timeout = 1;		/* after first time, wait a bit */	}    errnoSet (errnoCopy);    /* terminate both the queues */    /*     * Since eventTerminate() can wake up a task, we want to put all tasks     * in the ready queue before doing a windExit(), so that it is sure that     * the task of highest priority runs first. To achieve that, the     * statements 'kernelState = TRUE;' and 'windExit();' have been moved     * from qJobTerminate() to here. This is the only place that qJobTerminate     * is called.     */    kernelState = TRUE;    qJobTerminate (&msgQId->msgQ);    qJobTerminate (&msgQId->freeQ);    eventTerminate (&msgQId->events);/* free task waiting for events if any */    windExit ();    if (dealloc)	objFree (msgQClassId, (char *) msgQId);    TASK_UNSAFE ();				/* TASK UNSAFE */    return (OK);    }/********************************************************************************* msgQSend - send a message to a message queue** This routine sends the message in <buffer> of length <nBytes> to the message* queue <msgQId>.  If any tasks are already waiting to receive messages* on the queue, the message will immediately be delivered to the first* waiting task.  If no task is waiting to receive messages, the message* is saved in the message queue and if a task has previously registered to * receive events from the message queue, these events are sent in the context * of this call.  This may result in the unpending of the task waiting for * the events.  If the message queue fails to send events and if it was * created using the MSG_Q_EVENTSEND_ERR_NOTIFY option, ERROR is returned * even though the send operation was successful.** The <timeout> parameter specifies the number of ticks to wait for free* space if the message queue is full.  The <timeout> parameter can also have * the following special values:* .iP "NO_WAIT  (0)" 8* return immediately, even if the message has not been sent.  * .iP "WAIT_FOREVER  (-1)"* never time out.* .LP** The <priority> parameter specifies the priority of the message being sent.* The possible values are:* .iP "MSG_PRI_NORMAL  (0)" 8* normal priority; add the message to the tail of the list of queued * messages.* .iP "MSG_PRI_URGENT  (1)"* urgent priority; add the message to the head of the list of queued messages.* .LP** USE BY INTERRUPT SERVICE ROUTINES* This routine can be called by interrupt service routines as well as* by tasks.  This is one of the primary means of communication* between an interrupt service routine and a task.  When called from an* interrupt service routine, <timeout> must be NO_WAIT.** RETURNS: OK on success or ERROR otherwise.** ERRNO:* .iP "S_distLib_NOT_INITIALIZED"* Distributed objects message queue library (VxFusion) not initialized.* .iP "S_smObjLib_NOT_INITIALIZED"* Shared memory message queue library (VxMP Option) not initialized.* .iP "S_objLib_OBJ_ID_ERROR"* Invalid message queue ID.* .iP "S_objLib_OBJ_DELETED"* Message queue deleted while calling task was pended.* .iP "S_objLib_OBJ_UNAVAILABLE"* No free buffer space when NO_WAIT timeout specified.* .iP "S_objLib_OBJ_TIMEOUT"* Timeout occurred while waiting for buffer space.* .iP "S_msgQLib_INVALID_MSG_LENGTH"* Message length exceeds limit.* .iP "S_msgQLib_NON_ZERO_TIMEOUT_AT_INT_LEVEL"* Called from ISR with non-zero timeout.* .iP "S_eventLib_EVENTSEND_FAILED"* Message queue failed to send events to registered task.  This errno * value can only exist if the message queue was created with the * MSG_Q_EVENTSEND_ERR_NOTIFY option.* .LP** SEE ALSO: msgQSmLib, msgQEvStart*/STATUS msgQSend    (    FAST MSG_Q_ID       msgQId,         /* message queue on which to send */    char *              buffer,         /* message to send */    FAST UINT           nBytes,         /* length of message */    int                 timeout,        /* ticks to wait */    int                 priority        /* MSG_PRI_NORMAL or MSG_PRI_URGENT */    )    {    FAST MSG_NODE *	pMsg;    if (ID_IS_SHARED (msgQId))			/* message Q is shared? */        {		if (ID_IS_DISTRIBUTED (msgQId)) /* message queue is distributed? */			{			if (msgQDistSendRtn == NULL)				{				errno = S_distLib_NOT_INITIALIZED; 				return (ERROR);				}		 	return ((*msgQDistSendRtn) (msgQId, buffer, nBytes,			 	timeout, WAIT_FOREVER, priority));			}        if (msgQSmSendRtn == NULL)            {            errno = S_smObjLib_NOT_INITIALIZED;            return (ERROR);            }        return ((*msgQSmSendRtn) (SM_OBJ_ID_TO_ADRS (msgQId), buffer, nBytes,				  timeout, priority));	}    /* message queue is local */    if (!INT_CONTEXT ())	TASK_LOCK ();    else	{	if (timeout != 0)	    {	    errnoSet (S_msgQLib_NON_ZERO_TIMEOUT_AT_INT_LEVEL);	    return (ERROR);	    }	}restart:    if (OBJ_VERIFY (msgQId, msgQClassId) != OK)	{	if (!INT_CONTEXT ())	    TASK_UNLOCK ();	return (ERROR);	}#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging routine */    EVT_OBJ_5 (OBJ, msgQId, msgQClassId, EVENT_MSGQSEND, msgQId, 	       buffer, nBytes, timeout, priority);#endif    if (nBytes > msgQId->maxMsgLength)	{	if (!INT_CONTEXT ())	    TASK_UNLOCK ();	errnoSet (S_msgQLib_INVALID_MSG_LENGTH);	return (ERROR);	}    pMsg = (MSG_NODE *) qJobGet (msgQId, &msgQId->freeQ, timeout);    if (pMsg == (MSG_NODE *) NONE)	{	timeout = SIG_TIMEOUT_RECALC(timeout);	goto restart;	}    if (pMsg == NULL)	{#if FALSE	msgQId->sendTimeouts++;#else	/*	 * The timeout stat should only be updated if a timeout has occured.	 * An OBJ_VERIFY needs to be performed to catch the case where a 	 * timeout indeed occured, but the message queue is subsequently 	 * deleted before the current task is rescheduled.	 */	if (errnoGet() == S_objLib_OBJ_TIMEOUT)             {	    if (OBJ_VERIFY (msgQId, msgQClassId) == OK)	        msgQId->sendTimeouts++;            else                errnoSet(S_objLib_OBJ_DELETED);            }#endif /* FALSE */	if (!INT_CONTEXT ())	    TASK_UNLOCK ();	return (ERROR);	}    pMsg->msgLength = nBytes;    bcopy (buffer, MSG_NODE_DATA (pMsg), (int) nBytes);    if (qJobPut (msgQId, &msgQId->msgQ, &pMsg->node, priority) != OK)	{	if (!INT_CONTEXT ())	    TASK_UNLOCK ();	return (ERROR); /* errno set by qJobPut() */	}    if (!INT_CONTEXT ())	TASK_UNLOCK ();    return (OK);    }/********************************************************************************* msgQReceive - receive a message from a message queue** This routine receives a message from the message queue <msgQId>.* The received message is copied into the specified <buffer>, which is* <maxNBytes> in length.  If the message is longer than <maxNBytes>,* the remainder of the message is discarded (no error indication* is returned).** The <timeout> parameter specifies the number of ticks to wait for * a message to be sent to the queue, if no message is available when* msgQReceive() is called.  The <timeout> parameter can also have * the following special values: * .iP "NO_WAIT  (0)" 8* return immediately, whether a message has been received or not.  * .iP "WAIT_FOREVER  (-1)"* never time out.* .LP** WARNING: This routine must not be called by interrupt service routines.** RETURNS:* The number of bytes copied to <buffer>, or ERROR.** ERRNO: S_distLib_NOT_INITIALIZED, S_smObjLib_NOT_INITIALIZED,*        S_objLib_OBJ_ID_ERROR, S_objLib_OBJ_DELETED,*        S_objLib_OBJ_UNAVAILABLE, S_objLib_OBJ_TIMEOUT,*        S_msgQLib_INVALID_MSG_LENGTH, S_intLib_NOT_ISR_CALLABLE** SEE ALSO: msgQSmLib*/int msgQReceive    (    FAST MSG_Q_ID       msgQId,         /* message queue from which to receive */    char *              buffer,         /* buffer to receive message */    UINT                maxNBytes,      /* length of buffer */    int                 timeout         /* ticks to wait */    )    {    FAST MSG_NODE *	pMsg;    FAST int		bytesReturned;    if (INT_RESTRICT() != OK) /* errno set by INT_RESTRICT() */	return ERROR;    if (ID_IS_SHARED (msgQId))			/* message Q is shared? */        {		if (ID_IS_DISTRIBUTED (msgQId)) /* message queue is distributed? */			{			if (msgQDistReceiveRtn == NULL)				{				errno = S_distLib_NOT_INITIALIZED;			 	return (ERROR);				}			return ((*msgQDistReceiveRtn) (msgQId, buffer,				maxNBytes, timeout, WAIT_FOREVER));			}        if (msgQSmReceiveRtn == NULL)            {            errno = S_smObjLib_NOT_INITIALIZED;            return (ERROR);            }        return ((*msgQSmReceiveRtn) (SM_OBJ_ID_TO_ADRS (msgQId), buffer,				     maxNBytes, timeout));	}    /* message queue is local */    /* even though maxNBytes is unsigned, check for < 0 to catch possible     * caller errors     */    if ((int) maxNBytes < 0)	{	errnoSet (S_msgQLib_INVALID_MSG_LENGTH);	return (ERROR);	}    TASK_LOCK ();restart:    if (OBJ_VERIFY (msgQId, msgQClassId) != OK)	{	TASK_UNLOCK ();	return (ERROR);	}#ifdef WV_INSTRUMENTATION    /* windview - level 1 event logging routine */    EVT_OBJ_4 (OBJ, msgQId, msgQClassId, EVENT_MSGQRECEIVE, msgQId, 	       buffer, maxNBytes, timeout);#endif    pMsg = (MSG_NODE *) qJobGet (msgQId, &msgQId->msgQ, timeout);    if (pMsg == (MSG_NODE *) NONE)	{	timeout = SIG_TIMEOUT_RECALC(timeout);	goto restart;	}    if (pMsg == NULL)	{#if FALSE	msgQId->recvTimeouts++;#else	/*	 * The timeout stat should only be updated if a timeout has occured.	 * An OBJ_VERIFY needs to be performed to catch the case where a 	 * timeout indeed occured, but the message queue is subsequently 	 * deleted before the current task is rescheduled.	 */	if (errnoGet() == S_objLib_OBJ_TIMEOUT)             {	    if (OBJ_VERIFY (msgQId, msgQClassId) == OK)	        msgQId->sendTimeouts++;            else                errnoSet(S_objLib_OBJ_DELETED);            }#endif /* FALSE */	TASK_UNLOCK ();	return (ERROR);	}    bytesReturned = min (pMsg->msgLength, maxNBytes);    bcopy (MSG_NODE_DATA (pMsg), buffer, bytesReturned);    qJobPut (msgQId, &msgQId->freeQ, &pMsg->node, Q_JOB_PRI_DONT_CARE);    TASK_UNLOCK ();    return (bytesReturned);    }/********************************************************************************* msgQNumMsgs - get the number of messages queued to a message queue** This routine returns the number of messages currently queued to a specified* message queue.** RETURNS:* The number of messages queued, or ERROR.** ERRNO:  S_distLib_NOT_INITIALIZED, S_smObjLib_NOT_INITIALIZED,*         S_objLib_OBJ_ID_ERROR** SEE ALSO: msgQSmLib*/int msgQNumMsgs    (    FAST MSG_Q_ID       msgQId          /* message queue to examine */    )    {    if (ID_IS_SHARED (msgQId))			/* message Q is shared? */        {		if (ID_IS_DISTRIBUTED (msgQId)) /* message queue is distributed? */			{			if (msgQDistNumMsgsRtn == NULL)				{				errno = S_distLib_NOT_INITIALIZED;				return (ERROR);				}			return ((*msgQDistNumMsgsRtn) (msgQId, WAIT_FOREVER));			}        if (msgQSmNumMsgsRtn == NULL)            {            errno = S_smObjLib_NOT_INITIALIZED;            return (ERROR);            }        return ((*msgQSmNumMsgsRtn) (SM_OBJ_ID_TO_ADRS (msgQId)));	}    /* message queue is local */    if (OBJ_VERIFY (msgQId, msgQClassId) != OK)	return (ERROR);    return (msgQId->msgQ.count);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费9x9x人网站视频| 三级成人在线视频| 国产91在线观看丝袜| www日韩大片| 成人在线视频一区| 国产精品第13页| 99re热这里只有精品免费视频| 亚洲伦理在线精品| 欧美日本精品一区二区三区| 日本亚洲欧美天堂免费| 久久夜色精品国产噜噜av| 成人丝袜18视频在线观看| 亚洲欧美日韩在线不卡| 欧美日韩一区二区电影| 久久精品国产成人一区二区三区| 精品久久久影院| 成人理论电影网| 亚洲综合免费观看高清完整版 | 亚洲日本一区二区| 在线播放中文一区| 国内精品写真在线观看| 国产精品国产三级国产aⅴ原创| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲一区二区三区四区在线| 亚洲一区二区在线播放相泽 | 99在线视频精品| 一区二区三区四区亚洲| 欧美一区二区三区婷婷月色| 国产999精品久久久久久| 一区二区三区视频在线观看| 日韩精品一区二区三区四区| 粉嫩高潮美女一区二区三区 | 午夜精品一区二区三区电影天堂 | 欧美激情综合在线| 精品视频免费看| 成人午夜视频网站| 蜜桃av噜噜一区二区三区小说| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 91高清视频免费看| 国产精品一区二区在线观看不卡 | 亚洲国产综合人成综合网站| 精品成人免费观看| 91福利在线观看| 成人网男人的天堂| 看片的网站亚洲| 一区二区三区 在线观看视频| 久久综合av免费| 精品视频免费在线| 99久久精品国产毛片| 激情图片小说一区| 五月婷婷综合激情| 亚洲乱码国产乱码精品精的特点| 久久久99久久| 欧美岛国在线观看| 欧美久久久久久久久久| 99久久精品国产导航| 国产高清无密码一区二区三区| 日本aⅴ亚洲精品中文乱码| 亚洲精品成人精品456| 国产日韩三级在线| 久久综合久久综合久久综合| 91精品国产综合久久香蕉麻豆| 在线一区二区观看| 成人av网站在线观看免费| 国产麻豆9l精品三级站| 久久精品国产999大香线蕉| 亚洲成人av资源| 亚洲成人黄色影院| 亚洲成人免费观看| 五月天网站亚洲| 日韩av一区二区三区四区| 亚洲一区在线观看网站| 亚洲码国产岛国毛片在线| 国产精品久久久久久一区二区三区| 国产三级欧美三级| 国产欧美一区二区三区网站| 久久午夜国产精品| 国产亚洲va综合人人澡精品| 精品国产百合女同互慰| 精品国产第一区二区三区观看体验| 欧美一级艳片视频免费观看| 91精品国产美女浴室洗澡无遮挡| 69av一区二区三区| 5566中文字幕一区二区电影| 91精品国产麻豆| 精品国精品国产| 国产调教视频一区| 中文字幕不卡的av| 亚洲精品中文在线| 亚洲成人精品一区二区| 亚洲国产成人av网| 麻豆精品视频在线观看免费| 麻豆精品视频在线观看| 国产一区高清在线| 成人av在线播放网址| 色偷偷久久人人79超碰人人澡| 91黄色激情网站| 777久久久精品| 国产网站一区二区| 亚洲精品视频在线| 日韩综合小视频| 狠狠色综合播放一区二区| 成人综合婷婷国产精品久久免费| 91在线高清观看| 7777精品伊人久久久大香线蕉 | 欧美性色综合网| 欧美一区二区三区四区高清| 久久精品视频一区二区三区| 亚洲精品视频免费看| 日韩vs国产vs欧美| 国产成人av一区二区| 欧洲另类一二三四区| 日韩一区二区在线播放| 国产亚洲制服色| 亚洲va欧美va天堂v国产综合| 国产伦精品一区二区三区在线观看 | 欧美亚洲动漫精品| 日韩精品一区二区三区视频播放 | 欧美videos中文字幕| 欧美国产日韩在线观看| 亚洲大片在线观看| 成人影视亚洲图片在线| 5858s免费视频成人| 国产精品高潮呻吟| 人人爽香蕉精品| 99热99精品| 精品国产露脸精彩对白| 亚洲一区二区在线观看视频| 国产精品资源在线看| 欧美日韩黄视频| 亚洲欧洲av另类| 久久国产成人午夜av影院| 91亚洲国产成人精品一区二三| 欧美成人一区二区三区片免费| 亚洲色图欧洲色图婷婷| 国产美女精品人人做人人爽| 欧美日韩一区二区三区免费看| 中文字幕二三区不卡| 麻豆成人综合网| 欧美艳星brazzers| 国产精品狼人久久影院观看方式| 日韩高清在线一区| 色天天综合色天天久久| 久久久高清一区二区三区| 一区二区三区欧美激情| 成人ar影院免费观看视频| 2022国产精品视频| 免费人成在线不卡| 欧美日韩一区小说| 亚洲桃色在线一区| 成人手机在线视频| 26uuu色噜噜精品一区二区| 亚洲成人激情自拍| 一本一道综合狠狠老| 中文字幕一区在线观看视频| 国产一区二区主播在线| 日韩午夜激情av| 日av在线不卡| 欧美一级生活片| 日韩精品一区第一页| 欧美日韩久久一区二区| 一区二区三区国产精品| 色综合天天综合网天天看片| 国产精品嫩草99a| 成人午夜私人影院| 国产精品久久久久影院老司| 国产成a人亚洲精| 久久久久久**毛片大全| 国产激情精品久久久第一区二区 | 中文字幕av免费专区久久| 国产精品18久久久久| 久久久欧美精品sm网站| 国产成人在线色| 国产精品久久久久久久午夜片 | 色综合久久综合网欧美综合网| 国产精品久久久久天堂| 一本一本大道香蕉久在线精品| 一区二区三区在线视频免费观看| 在线观看免费亚洲| 五月婷婷久久综合| 日韩一级在线观看| 国产乱码精品一区二区三区忘忧草| 国产亚洲精品精华液| 色综合色综合色综合| 亚洲电影在线播放| 精品久久久久久久久久久久久久久| 国产自产2019最新不卡| 国产欧美日韩卡一| 色婷婷激情久久| 日韩二区在线观看| 久久久综合精品| 色婷婷精品久久二区二区蜜臂av| 婷婷久久综合九色国产成人| 日韩欧美国产一区在线观看| 国产成人免费视频网站高清观看视频| 国产精品久久久久影院老司| 欧美日韩一级片网站| 狠狠色丁香九九婷婷综合五月| 亚洲色图欧美激情| 日韩欧美国产wwwww|