亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91福利社在线观看| 欧美主播一区二区三区| 看片的网站亚洲| 亚洲一区二区美女| 亚洲已满18点击进入久久| 中文字幕一区二区三区在线观看| 国产欧美一区二区精品久导航 | 亚洲欧美综合另类在线卡通| 国产色综合久久| 欧美国产乱子伦| 国产精品日韩成人| 亚洲精品中文在线影院| 一区二区三区精品| 日韩不卡一二三区| 六月丁香婷婷久久| 国产精品香蕉一区二区三区| 顶级嫩模精品视频在线看| 91免费小视频| 欧美日韩一卡二卡| 久久久一区二区| 亚洲精品一二三四区| 奇米四色…亚洲| 丁香网亚洲国际| 在线免费av一区| 欧美xingq一区二区| 国产精品毛片久久久久久久| 亚洲综合自拍偷拍| 狠狠v欧美v日韩v亚洲ⅴ| 成人av小说网| 日韩一区二区三区四区五区六区| 久久中文字幕电影| 亚洲国产乱码最新视频| 国产一区二区三区高清播放| 91美女福利视频| 欧美大肚乱孕交hd孕妇| 自拍偷在线精品自拍偷无码专区| 午夜久久福利影院| 国产夫妻精品视频| 欧美另类videos死尸| 久久精品一二三| 五月激情丁香一区二区三区| 成人午夜av在线| 91精品欧美福利在线观看| 国产精品色噜噜| 免费在线观看成人| 色999日韩国产欧美一区二区| 精品成人一区二区| 亚洲成人精品一区| 97aⅴ精品视频一二三区| 日韩欧美成人一区| 亚洲国产精品嫩草影院| 国产伦精品一区二区三区在线观看| 91网页版在线| 亚洲国产激情av| 久久成人av少妇免费| 欧美日韩国产综合久久| 国产精品久久久久一区二区三区| 久久99九九99精品| 欧美精品18+| 午夜精品福利久久久| 97久久精品人人做人人爽50路| 精品国产一区a| 一区二区三区四区av| 99这里只有精品| 国产欧美一区二区三区在线老狼| 麻豆视频观看网址久久| 欧美男人的天堂一二区| 夜夜操天天操亚洲| 欧美亚洲日本国产| 亚洲欧美成aⅴ人在线观看| 99久久99久久免费精品蜜臀| 欧美成人三级电影在线| 午夜日韩在线观看| 欧美日韩视频在线观看一区二区三区| 亚洲天堂久久久久久久| av电影天堂一区二区在线 | 成人app软件下载大全免费| 精品福利一区二区三区免费视频| 三级欧美韩日大片在线看| 欧美日韩在线三级| 青青草原综合久久大伊人精品优势 | 日韩三级视频在线看| 视频在线观看91| 欧美一区二区观看视频| 免费在线一区观看| 日韩欧美二区三区| 国产激情视频一区二区三区欧美| 久久夜色精品国产噜噜av| 国产精品一区专区| 中文字幕电影一区| 一本大道久久精品懂色aⅴ| 亚洲精品免费在线播放| 欧美日本免费一区二区三区| 午夜精品久久久久久| 精品国产3级a| 99视频有精品| 日韩精品一二三四| 日本一区二区三区久久久久久久久不| 91在线视频在线| 亚洲成人在线网站| 欧美mv和日韩mv国产网站| 国产成都精品91一区二区三| 亚洲男人的天堂一区二区 | 蜜桃av一区二区| 国产亚洲美州欧州综合国| 99久久99久久免费精品蜜臀| 偷拍日韩校园综合在线| 国产日韩成人精品| 欧美日韩色综合| 国产精品一卡二| 午夜欧美在线一二页| 2021国产精品久久精品| 色婷婷av一区二区三区gif| 蜜臀久久99精品久久久画质超高清| 国产亚洲精品bt天堂精选| 色美美综合视频| 国产精品系列在线播放| 亚洲不卡av一区二区三区| 国产婷婷色一区二区三区四区| 欧美日韩国产大片| 成人激情综合网站| 日韩高清不卡一区| 最新热久久免费视频| 日韩三级.com| 在线观看国产精品网站| 成人免费毛片片v| 日韩av电影免费观看高清完整版 | 欧美三级韩国三级日本一级| 国产精品中文字幕一区二区三区| 亚洲妇熟xx妇色黄| 国产精品久久久久永久免费观看 | 亚洲欧洲日韩综合一区二区| 久久奇米777| 日韩一区二区三区三四区视频在线观看| www.色精品| 成人中文字幕合集| 国产美女一区二区三区| 奇米影视一区二区三区小说| 亚洲国产cao| 亚洲国产成人av好男人在线观看| 亚洲欧洲成人精品av97| 中文字幕国产精品一区二区| 久久久久久久久久久黄色| 欧美一区中文字幕| 欧美日韩国产影片| 欧美中文字幕久久| 欧美日精品一区视频| 在线观看国产日韩| 欧美日韩精品欧美日韩精品一 | 69av一区二区三区| 欧美日韩国产综合一区二区三区| 色综合婷婷久久| 91蜜桃网址入口| 91麻豆自制传媒国产之光| 99久久国产综合精品色伊| 成人免费视频网站在线观看| 懂色av一区二区夜夜嗨| 成人白浆超碰人人人人| jizzjizzjizz欧美| 色综合久久99| 欧美视频在线观看一区二区| 欧美少妇bbb| 日韩亚洲电影在线| 久久久久亚洲蜜桃| 亚洲欧洲精品一区二区三区不卡| 中文字幕av不卡| 亚洲精品伦理在线| 日韩精品一卡二卡三卡四卡无卡| 美女免费视频一区| 国产不卡在线视频| 色av成人天堂桃色av| 91麻豆精品国产91久久久更新时间 | 欧美影院精品一区| 3751色影院一区二区三区| 精品久久国产字幕高潮| 国产欧美综合色| 亚洲国产精品一区二区久久 | 亚洲免费av在线| 亚洲午夜国产一区99re久久| 视频在线观看91| 成人免费高清在线观看| 欧美亚洲高清一区二区三区不卡| 6080国产精品一区二区| 国产亚洲精品7777| 曰韩精品一区二区| 狠狠色2019综合网| 日本精品视频一区二区三区| 日韩三级视频在线观看| 国产精品福利影院| 久久99精品久久久久| 99视频在线精品| 欧美变态凌虐bdsm| 亚洲精品菠萝久久久久久久| 开心九九激情九九欧美日韩精美视频电影| 国产成人免费网站| 777奇米四色成人影色区| 国产精品情趣视频| 毛片不卡一区二区| 欧美日韩视频一区二区| 中文字幕精品在线不卡|