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

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

?? msgqlib.c

?? 操作系統(tǒng)開(kāi)發(fā),vxwork操作系統(tǒng)源代碼
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
    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);    }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成在线播放网站岛国| 国产亚洲美州欧州综合国| 欧美精品亚洲二区| 久久欧美一区二区| 午夜精品视频一区| 色综合天天综合色综合av| 久久精品一区二区三区av| 久久久久青草大香线综合精品| 一片黄亚洲嫩模| 亚洲一级电影视频| 天堂资源在线中文精品| 视频精品一区二区| 在线亚洲高清视频| 欧美一区二区三区在线看| 天天射综合影视| 色av一区二区| 欧美三级资源在线| 一区二区三区欧美激情| 亚洲曰韩产成在线| 91福利精品视频| 欧美三级电影网| 日韩美女视频在线| 天天爽夜夜爽夜夜爽精品视频| 日本美女视频一区二区| 色视频成人在线观看免| 成人免费在线播放视频| 高清在线不卡av| 久久精品免费在线观看| 国产精品成人网| 日韩在线a电影| 5566中文字幕一区二区电影| 精品国产自在久精品国产| 国产欧美日韩另类一区| 国产麻豆精品在线| 久久久久久久久久久电影| 国产一区二区精品在线观看| 久久综合久久综合亚洲| 国产福利一区二区三区视频| 久久久国产精华| 成人免费观看视频| 亚洲精品乱码久久久久久黑人| 蜜臀av一级做a爰片久久| 日韩欧美激情在线| 国内精品伊人久久久久av一坑| 久久综合给合久久狠狠狠97色69| 亚洲激情图片小说视频| 91福利资源站| 美女一区二区久久| 国产婷婷精品av在线| 亚洲成人动漫av| 成人av电影在线播放| 亚洲精品中文字幕在线观看| 欧美日韩精品专区| 亚洲激情自拍偷拍| 51午夜精品国产| 国产麻豆成人传媒免费观看| 国产精品久久夜| 在线观看日韩一区| 国产揄拍国内精品对白| 日韩欧美一区二区免费| 国产成人综合在线| 亚洲精品高清视频在线观看| 日韩美一区二区三区| 日韩专区一卡二卡| 久久精品免视看| 欧美日韩精品一区二区三区四区 | 久色婷婷小香蕉久久| www激情久久| 91麻豆国产自产在线观看| 国产日韩欧美在线一区| 黄色成人免费在线| 亚洲激情av在线| 99re成人精品视频| 国产精品欧美精品| 88在线观看91蜜桃国自产| 国产成人丝袜美腿| 亚洲自拍都市欧美小说| 日本道精品一区二区三区| 久久精品二区亚洲w码| 亚洲人成网站色在线观看| 精品欧美黑人一区二区三区| 美女精品自拍一二三四| 日韩一本二本av| 一本大道久久a久久综合婷婷 | 亚洲视频 欧洲视频| 欧美videos大乳护士334| 色悠久久久久综合欧美99| 国精产品一区一区三区mba桃花| 日韩一卡二卡三卡四卡| 日本欧美在线看| 日韩欧美二区三区| 欧美日韩激情一区| 日本国产一区二区| 成人v精品蜜桃久久一区| 久久精品国产久精国产爱| 26uuu色噜噜精品一区| 国产大陆精品国产| 综合精品久久久| 国产香蕉久久精品综合网| 欧美xxx久久| 国产成人三级在线观看| **性色生活片久久毛片| 久久精品欧美日韩| 色综合一区二区三区| 亚洲va国产va欧美va观看| 亚洲女同一区二区| 3d动漫精品啪啪1区2区免费| 久久精品999| 国产精品污www在线观看| 精品国产乱码久久久久久闺蜜| 欧美日韩精品电影| 国产精品2024| 国产成人精品免费看| 亚洲欧美日韩国产综合| 国产精品久久久久桃色tv| 欧美卡1卡2卡| 高清不卡在线观看| 国产99一区视频免费 | 亚洲精品成人悠悠色影视| 亚洲日本va午夜在线影院| 亚洲日本丝袜连裤袜办公室| 日韩午夜激情视频| 成人免费看的视频| 免费在线观看不卡| 国产精品人人做人人爽人人添 | 成人性生交大合| 成人免费观看男女羞羞视频| 99久久精品情趣| 欧美综合一区二区| 欧美一区二区日韩| 久久精品人人爽人人爽| 国产精品视频一区二区三区不卡| 亚洲欧美综合色| 欧美成人a∨高清免费观看| 在线免费一区三区| 91精品国产品国语在线不卡| 精品福利av导航| 国产精品美女久久久久久2018 | 国产日韩精品视频一区| 欧美一二三区精品| 欧美日韩在线综合| 91亚洲精品乱码久久久久久蜜桃| 色婷婷综合久久久中文字幕| 粉嫩av亚洲一区二区图片| 91美女片黄在线观看| 欧美日韩国产bt| 在线影视一区二区三区| 欧美一区二区视频免费观看| 欧美高清在线精品一区| 一区二区三区久久| 久久99精品久久久久久久久久久久| 亚洲午夜久久久久久久久电影院| 日韩电影网1区2区| 波多野结衣欧美| 国产 欧美在线| 制服丝袜在线91| 欧美日韩精品免费观看视频| 在线日韩av片| 国产亚洲欧美日韩在线一区| 亚洲一级片在线观看| 国产91清纯白嫩初高中在线观看| 国产一区二区三区免费在线观看| 裸体健美xxxx欧美裸体表演| 99久久国产综合精品麻豆| 国产成人在线观看| 欧美高清一级片在线| 国产精品理论在线观看| 亚洲日本一区二区三区| 亚洲欧美在线aaa| 另类小说一区二区三区| 国产露脸91国语对白| 国产成人av电影在线观看| 欧美日韩黄色影视| 亚洲精品成人少妇| 成人午夜私人影院| 91麻豆视频网站| 国产欧美日韩精品在线| 日韩精品91亚洲二区在线观看 | av中文字幕在线不卡| 91在线一区二区三区| 久久久综合视频| 国产精品免费久久| 国产精品白丝av| 9人人澡人人爽人人精品| 在线观看视频一区二区欧美日韩| 欧美日韩日本视频| 一区二区三区中文字幕| 亚洲成在线观看| 一本大道久久a久久综合婷婷| 国产精品色眯眯| 大美女一区二区三区| 在线观看av不卡| 日韩美女在线视频| 久久精品免费看| 波多野结衣精品在线| 中文字幕一区二区视频| 成人的网站免费观看| 欧美一区二区三区免费视频| 亚洲成人资源在线| 欧美日韩免费电影|