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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? msgqdistlib.c

?? vxworks操作系統的源代碼 供研究學習
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* msgQDistLib.c - distributed objects message queue library (VxFusion option) *//* Copyright 1999 - 2002 Wind River Systems, Inc. *//*modification history--------------------01o,23oct01,jws  fix compiler warnings (SPR 71154); fix man pages (SPR 71239)01n,24jul01,r_s  changed code to be ANSI compatible so that it compiles with                 diab. made asm macro changes for diab01m,09jun99,drm  Changing an "errno = " to errnoSet()01l,01jun99,drm  Changing documentation for msgQDistReceive() to indicate that                 the return value is the number of bytes received or ERROR                 rather than OK or ERROR.01k,24may99,drm  added vxfusion prefix to VxFusion related includes01j,23feb99,drm  adding S_distLib_UNREACHABLE to documentation01i,23feb99,drm  returning different errno when overallTimeout expires01h,18feb99,wlf  doc cleanup01g,28oct98,drm  documentation modifications01f,12aug98,drm  added #include stmt for distLibP.h01e,08may98,ur   removed 8 bit node id restriction01d,15apr98,ur   retransmit errors, if failed to send/receive01c,09apr98,ur   added some errno setting, for remote errors01b,04mar98,ur   patched memory leak in msgQDistInput/RECV_REQ.01a,06jun97,ur   written.*//*DESCRIPTIONThis library provides the interface to distributed message queues.Any task on any node in the system can send messages to or receivefrom a distributed messsage queue. Full duplex communication betweentwo tasks generally requires two distributed messsage queues, one foreach direction.Distributed messsage queues are created with msgQDistCreate().  Aftercreation, they can be manipulated using the generic routines for localmessage queues; for more information on the use of these routines, see themanual entry for msgQLib.  The msgQDistLib library also provides the msgQDistSend(), msgQDistReceive(), and msgQDistNumMsgs() routines which support additional parameters that are useful for working with distributed message queues.The distributed objects message queue library is initialized by callingdistInit().AVAILABILITYThis module is distributed as a component of the unbundled distributedmessage queues option, VxFusion.INCLUDE FILES: msgQDistLib.hSEE ALSO: msgQLib, msgQDistShow, distLib*/#include "vxWorks.h"#if defined (MSG_Q_DIST_REPORT) || defined (DIST_DIAGNOSTIC)#include "stdio.h"#endif#include "stdlib.h"#include "string.h"#include "sllLib.h"#include "errnoLib.h"#include "msgQLib.h"#include "semLib.h"#include "taskLib.h"#include "netinet/in.h"#include "private/semLibP.h"#include "private/msgQLibP.h"#include "vxfusion/msgQDistLib.h"#include "vxfusion/msgQDistGrpLib.h"#include "vxfusion/distIfLib.h"#include "vxfusion/distLib.h"#include "vxfusion/distStatLib.h"#include "vxfusion/private/msgQDistLibP.h"#include "vxfusion/private/msgQDistGrpLibP.h"#include "vxfusion/private/distPktLibP.h"#include "vxfusion/private/distNetLibP.h"#include "vxfusion/private/distLibP.h"/* globals */TBL_NODE                *pMsgQDistTbl;    /* windSh needs this global *//* locals */LOCAL SL_LIST            msgQDistTblFreeList;LOCAL SEMAPHORE          msgQDistTblLock;LOCAL int                msgQDistTblSize;LOCAL BOOL               msgQDistLibInstalled = FALSE;/* local prototypes */LOCAL STATUS                msgQDistTblPut (MSG_Q_ID msgQId, TBL_IX *pTblIx);#ifdef __SUPPORT_MSG_Q_DIST_DELETELOCAL STATUS                msgQDistTblDelete (TBL_IX tblIx);#endifLOCAL MSG_Q_ID              msgQDistTblGet (TBL_IX tblIx);LOCAL DIST_STATUS           msgQDistInput (DIST_NODE_ID nodeIdSrc,                                           DIST_TBUF_HDR *pTBufHdr);LOCAL STATUS                msgQDistSendStatus (DIST_NODE_ID nodeIdDest,                                                DIST_INQ_ID inqId,                                                short error);LOCAL DIST_MSG_Q_STATUS     msgQDistRecvReply (DIST_NODE_ID nodeIdReceiver,                                               DIST_INQ_ID inqIdReceiver,                                               MSG_Q_ID msgQId,                                               char *buffer,                                               UINT maxNBytes,                                               int timeout,                                               BOOL lastTry);LOCAL DIST_MSG_Q_STATUS     msgQDistSendReply (DIST_NODE_ID nodeIdSender,                                               DIST_INQ_ID inqIdSender,                                               MSG_Q_ID msgQId,                                               char *buffer,                                               UINT nBytes,                                               int timeout,                                               int priority,                                               BOOL lastTry);/***************************************************************************** msgQDistLibInit - initialize the distributed message queue package (VxFusion option)** This routine initializes the distributed message queue package.* It currently does nothing.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: N/A** NOMANUAL*/void msgQDistLibInit (void)    {    }/***************************************************************************** msgQDistInit - initialize distributed message queue library (VxFusion option)** This routine initializes the distributed message queue library.* It must be called before any other routine in the library.* The argument <msgQDistMax> limits the number of distributed message* queues created on this node. The maximum number of distributed message* queues is DIST_MSG_Q_MAX_QS .** RETURNS: OK or ERROR.** NOMANUAL*/STATUS msgQDistInit    (    int        sizeLog2        /* create 2^^sizeLog2 msgQ's */    )    {    TBL_IX    tblIx;    STATUS    status;    int       size;    int       msgQDistMax;    msgQDistMax = 1 << sizeLog2;    if (msgQDistMax > DIST_MSG_Q_MAX_QS)        {#ifdef DIST_DIAGNOSTIC        printf ("msgQDistInit: number of message queues is limited to %d\n",                DIST_MSG_Q_MAX_QS);#endif        return (ERROR);    /* too many local msgQs for underlying layer */        }    if (msgQDistLibInstalled == TRUE)        return (OK);    if (distInqInit (DIST_INQ_HASH_TBL_SZ_LOG2) == ERROR)        return (ERROR);    size = MEM_ROUND_UP (sizeof (TBL_NODE));    pMsgQDistTbl = (TBL_NODE *) malloc (msgQDistMax * size);    if (pMsgQDistTbl == NULL)        {#ifdef DIST_DIAGNOSTIC        printf ("msgQDistInit: memory allocation failed\n");#endif        return (ERROR);    /* out of memory */        }    semBInit (&msgQDistTblLock, SEM_Q_PRIORITY, SEM_EMPTY);    msgQDistTblSize = msgQDistMax;    sllInit (&msgQDistTblFreeList);    for (tblIx = 0; tblIx < msgQDistMax; tblIx++)        {        pMsgQDistTbl[tblIx].tblIx = tblIx;        sllPutAtHead (&msgQDistTblFreeList,                      (SL_NODE *) &(pMsgQDistTbl[tblIx]));        }    msgQDistTblUnlock();    /* Add message queue service to table of services. */    status = distNetServAdd (DIST_PKT_TYPE_MSG_Q, msgQDistInput,                             DIST_MSG_Q_SERV_NAME, DIST_MSG_Q_SERV_NET_PRIO,                             DIST_MSG_Q_SERV_TASK_PRIO,                             DIST_MSG_Q_SERV_TASK_STACK_SZ);    if (status == ERROR)        {#ifdef DIST_DIAGNOSTIC        printf ("msgQDistInit: cannot attach service\n");#endif        return (ERROR);        }    msgQDistSendRtn       = (FUNCPTR) msgQDistSend;    msgQDistReceiveRtn    = (FUNCPTR) msgQDistReceive;    msgQDistNumMsgsRtn    = (FUNCPTR) msgQDistNumMsgs;    msgQDistLibInstalled = TRUE;    return (OK);    }/***************************************************************************** msgQDistCreate - create a distributed message queue (VxFusion option)** This routine creates a distributed message queue capable of* holding up to <maxMsgs> messages, each up to <maxMsgLength> bytes long.* This routine returns a message queue ID used to identify the created* message queue. The queue can be created with the following options:* \is* \i MSG_Q_FIFO (0x00)* The queue pends tasks in FIFO order.* \i MSG_Q_PRIORITY (0x01)* The queue pends tasks in priority order. Remote tasks share the same* priority level.* \ie** The global message queue identifier returned can be used directly by generic* message queue handling routines in msgQLib, such as, msgQSend(), * msgQReceive(), and msgQNumMsgs().** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS:* MSG_Q_ID, or NULL if there is an error.** ERRNO:* \is* \i S_memLib_NOT_ENOUGH_MEMORY* If the routine is unable to allocate memory for message queues and message * buffers.* \i S_intLib_NOT_ISR_CALLABLE* If the routine is called from an interrupt service routine.* \i S_msgQLib_INVALID_QUEUE_TYPE* If the type of queue is invalid.* \i S_msgQDistLib_INVALID_MSG_LENGTH* If the message is too long for the VxFusion network layer.* \ie** SEE ALSO: msgQLib*/MSG_Q_ID msgQDistCreate    (    int maxMsgs,         /* max messages that can be queued */    int maxMsgLength,    /* max bytes in a message */    int options          /* message queue options */    )    {    DIST_OBJ_NODE *   pObjNode;    MSG_Q_ID          msgQId;    TBL_IX            tblIx;    int               maxMsgLen;    if (!msgQDistLibInstalled)        return (NULL);    /* call msgQDistInit() first */    maxMsgLen = (DIST_IF_MAX_FRAGS * (DIST_IF_MTU - DIST_IF_HDR_SZ)) -                 DIST_PKT_HDR_SIZEOF (DIST_PKT_MSG_Q_SEND);    if (maxMsgLength > maxMsgLen)        {        errnoSet (S_msgQDistLib_INVALID_MSG_LENGTH);        return (NULL);    /* msg too long for network layer */        }    if (options &~ MSG_Q_TYPE_MASK)        {        errnoSet (S_msgQLib_INVALID_QUEUE_TYPE);        return (NULL);    /* illegal option */        }    if ((msgQId = msgQCreate (maxMsgs, maxMsgLength, options)) == NULL)        return (NULL);    /* msgQCreate() failed */    if (msgQDistTblPut (msgQId, &tblIx) == ERROR)        {        msgQDelete (msgQId);        return (NULL);    /* table full */        }        pObjNode = distObjNodeGet();    pObjNode->objNodeType      = DIST_OBJ_TYPE_MSG_Q;    pObjNode->objNodeReside    = distNodeLocalGetId();    pObjNode->objNodeId        = TBL_IX_TO_DIST_OBJ_ID (tblIx);#ifdef MSG_Q_DIST_REPORT    printf ("msgQDistCreate: dMsgQId 0x%lx, msgQId %p\n",            dMsgQId, DIST_OBJ_NODE_TO_MSG_Q_ID (pObjNode));#endif    return (DIST_OBJ_NODE_TO_MSG_Q_ID (pObjNode));    }/***************************************************************************** msgQDistSend - send a message to a distributed message queue (VxFusion option)** This routine sends the message specified by <buffer> of length <nBytes> to * the distributed message queue or group specified by <msgQId>.** The argument <msgQTimeout> specifies the time in ticks to wait for the * queuing of the message. The argument <overallTimeout> specifies the time in* ticks to wait for both the sending and queuing of the message.* While it is an error to set <overallTimeout> to NO_WAIT (0), * WAIT_FOREVER (-1) is allowed for both <msgQTimeout> and <overallTimeout>.** The <priority> parameter specifies the priority of the message being sent.* It ranges between DIST_MSG_PRI_0 (highest priority) and DIST_MSG_PRI_7 * (lowest priority).  A priority of MSG_PRI_URGENT is mapped* to DIST_MSG_PRI_0; MSG_PRI_NORMAL is mapped to DIST_MSG_PRI_4 .* Messages sent with high priorities (DIST_MSG_PRI_0 to DIST_MSG_PRI_3)* are put to the head of the list of queued messages.* Lower priority messages (DIST_MSG_PRI_4 to DIST_MSG_PRI_7) are placed* at the queue's tail.** NOTE: When msgQDistSend() is called through msgQSend(), <msgQTimeout> is * set to <timeout> and <overallTimeout> to WAIT_FOREVER .** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK, or ERROR if the operation fails.** ERRNO:* \is* \i S_distLib_OBJ_ID_ERROR* The argument <msgQId> is invalid.* \i S_distLib_UNREACHABLE

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆专区一区二区三区四区五区| 亚洲综合自拍偷拍| 欧美一级国产精品| 欧美无人高清视频在线观看| 成人成人成人在线视频| 丁香另类激情小说| proumb性欧美在线观看| 成人高清视频免费观看| 国产成a人亚洲精| 成人精品在线视频观看| 成人免费电影视频| 色综合一个色综合| 欧美亚洲自拍偷拍| 欧美精品亚洲二区| 26uuu精品一区二区在线观看| 久久久综合九色合综国产精品| 久久九九久久九九| 自拍视频在线观看一区二区| 亚洲永久精品国产| 美女国产一区二区三区| 国产麻豆精品久久一二三| 成人av片在线观看| 欧美人妇做爰xxxⅹ性高电影| 日韩欧美国产午夜精品| 久久精品视频一区二区| 亚洲视频狠狠干| 午夜成人免费电影| 国产成人精品一区二区三区四区 | 色综合久久久网| 欧美三级中文字幕| 精品国产91亚洲一区二区三区婷婷 | 久久精品一区二区三区不卡牛牛| 中文一区一区三区高中清不卡| 综合久久综合久久| 日韩在线a电影| 99re这里只有精品6| 91精品国产aⅴ一区二区| 久久精品视频免费| 日韩国产精品久久| 99久久综合狠狠综合久久| 欧美另类变人与禽xxxxx| 国产亚洲精品精华液| 亚洲福利视频导航| 成人免费不卡视频| 欧美成人乱码一区二区三区| 亚洲欧美激情插 | 亚洲免费在线视频| 国产精品中文字幕日韩精品| 欧美亚洲免费在线一区| 国产人成亚洲第一网站在线播放| 亚洲一区在线视频| av成人动漫在线观看| 久久久五月婷婷| 视频一区中文字幕| 一本大道久久a久久精二百| 久久网站热最新地址| 日韩高清中文字幕一区| 色欧美日韩亚洲| 中文字幕乱码亚洲精品一区| 奇米影视7777精品一区二区| 色综合久久中文字幕| 中文字幕av一区二区三区高| 精品一二线国产| 欧美一级片在线| 亚洲成人av免费| 欧美性xxxxxxxx| 一区二区三区影院| 91视频一区二区| 国产精品全国免费观看高清| 国产伦精一区二区三区| 日韩精品一区国产麻豆| 视频精品一区二区| 欧美精品久久99久久在免费线| 一区二区免费视频| 欧美亚洲综合久久| 亚洲va韩国va欧美va| 欧美日韩一区小说| 亚洲国产一区二区三区| 欧美日韩大陆一区二区| 五月天精品一区二区三区| 欧美日韩精品综合在线| 日韩电影免费在线观看网站| 在线不卡中文字幕播放| 蜜桃av一区二区在线观看| 日韩精品一区二区三区视频在线观看| 日韩国产精品91| 久久网站热最新地址| 成人性生交大片免费看视频在线| 亚洲国产高清在线观看视频| 成人黄色av电影| 亚洲精品成人在线| 欧美剧情电影在线观看完整版免费励志电影| 亚洲欧美日韩中文字幕一区二区三区| 91麻豆精东视频| 午夜a成v人精品| 国产亚洲欧美在线| 一本久道久久综合中文字幕| 亚洲一二三区视频在线观看| 欧美大白屁股肥臀xxxxxx| 国产成人自拍网| 中文字幕一区av| 在线不卡一区二区| 国产不卡一区视频| 亚洲一区二区三区四区在线观看| 这里只有精品99re| 国产999精品久久| 亚洲国产精品一区二区尤物区| 欧美哺乳videos| 91一区二区三区在线播放| 视频一区二区三区在线| 中文字幕欧美国产| 91精品国产综合久久香蕉麻豆| 国产成人午夜高潮毛片| 亚洲国产欧美在线| 亚洲国产成人在线| 欧美一区午夜视频在线观看| 成人黄色免费短视频| 日本vs亚洲vs韩国一区三区二区| 国产亚洲综合av| 91精品欧美福利在线观看| 成人晚上爱看视频| 久草精品在线观看| 午夜精品久久久久影视| 国产精品日日摸夜夜摸av| 欧美一区二区三区喷汁尤物| 91在线观看地址| 国产99久久久久| 免费观看91视频大全| 亚洲欧美日韩国产综合| 国产婷婷精品av在线| 精品日韩一区二区| 7777精品伊人久久久大香线蕉 | 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲欧美日韩中文字幕一区二区三区 | www成人在线观看| 在线成人av影院| 欧美视频日韩视频| av毛片久久久久**hd| 国产精品一区在线| 久久精品国产色蜜蜜麻豆| 亚洲成av人在线观看| 亚洲综合清纯丝袜自拍| 自拍偷拍国产精品| 国产精品久久毛片av大全日韩| 26uuu亚洲婷婷狠狠天堂| 日韩欧美亚洲一区二区| 91精品国产91综合久久蜜臀| 欧美日韩精品欧美日韩精品一| 色婷婷综合在线| 欧美专区日韩专区| 一本到不卡精品视频在线观看| www.亚洲色图| 99麻豆久久久国产精品免费 | 亚洲国产成人私人影院tom| 久久色中文字幕| 久久久综合网站| 国产精品视频一区二区三区不卡| 久久这里只精品最新地址| 欧美成人精品1314www| 精品久久久久久久久久久久包黑料| 宅男在线国产精品| 日韩免费电影网站| 精品成人免费观看| 久久精品视频免费观看| 综合久久久久久| 亚洲123区在线观看| 日韩一区欧美二区| 国产在线精品一区二区夜色 | 日韩一区二区麻豆国产| 精品粉嫩超白一线天av| 久久久另类综合| 国产精品无码永久免费888| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 91色婷婷久久久久合中文| 欧美在线观看你懂的| 日韩一区二区三免费高清| 久久综合九色综合欧美98 | 欧美亚洲尤物久久| 日韩视频中午一区| 中文字幕免费一区| 亚洲mv在线观看| 国产一区二区三区日韩| 成人激情校园春色| 欧美日韩亚洲国产综合| 欧美草草影院在线视频| 国产精品久久久久久福利一牛影视| 一区二区三区波多野结衣在线观看| 日韩精品电影一区亚洲| 国产成a人亚洲精品| 欧美日韩成人一区| 国产精品狼人久久影院观看方式| 亚洲成人www| 99久久婷婷国产精品综合| 精品久久人人做人人爰| 樱桃国产成人精品视频| 国产激情一区二区三区| 欧美乱妇15p| 综合欧美一区二区三区| 国产麻豆视频精品| 欧美一区二区在线看|