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

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

?? distincolib.c

?? vxworks的完整的源代碼
?? C
字號(hào):
/* distIncoLib.c - incorporation protocol library (VxFusion option) *//* Copyright 1999-2002 Wind River Systems, Inc. *//*modification history--------------------01e,23oct01,jws  fix compiler warnings (SPR 71117)01d,24may99,drm  added vxfusion prefix to VxFusion related includes01c,11sep98,drm  changed distStatLib.h to private/distLibP.h01b,20jan98,ur   changed booting behaviour, do always send an INCO_UPNOW.01a,10sep97,ur   written.*//*DESCRIPTIONThe incorporation library handles the appearence of a new node.AVAILABILITYThis module is distributed as a component of the unbundled distributedmessage queues option, VxFusion.*/#include "vxWorks.h"#if defined (DIST_INCO_REPORT) || defined (DIST_DIAGNOSTIC)#include "stdio.h"#endif#include "stdlib.h"#include "semLib.h"#include "vxfusion/distIfLib.h"#include "vxfusion/private/distLibP.h"#include "vxfusion/private/distNodeLibP.h"#include "vxfusion/private/msgQDistGrpLibP.h"#include "vxfusion/private/distNameLibP.h"#include "vxfusion/private/distTBufLibP.h"#include "vxfusion/private/distIncoLibP.h"#include "vxfusion/private/distNetLibP.h"#include "vxfusion/private/distPktLibP.h"/* locals */LOCAL SEMAPHORE           distIncoWait4Done;LOCAL BOOL                distIncoLibInstalled = FALSE;/* local prototypes */LOCAL DIST_STATUS    distIncoInput (DIST_NODE_ID nodeIdIn,                                    DIST_TBUF_HDR *pReassembled);/***************************************************************************** distIncoLibInit - initialize this module (VxFusion option)** This routine currently does nothing.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: N/A* NOMANUAL*/void distIncoLibInit (void)    {    }/***************************************************************************** distIncoInit - start incorporation service (VxFusion option)** This routine starts the incorporation service.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK, if service is started.* NOMANUAL*/STATUS distIncoInit (void)    {    STATUS    status;    if (distIncoLibInstalled)        return (OK);    semBInit (&distIncoWait4Done, SEM_Q_FIFO, SEM_EMPTY);    /* Add INCO service to table of services. */    status = distNetServAdd (DIST_PKT_TYPE_INCO,                             distIncoInput,                             DIST_INCO_SERV_NAME,                             DIST_INCO_SERV_NET_PRIO,                             DIST_INCO_SERV_TASK_PRIO,                             DIST_INCO_SERV_TASK_STACK_SZ);    if (status == ERROR)        return (ERROR);    distIncoLibInstalled = TRUE;    return (OK);    }/***************************************************************************** distIncoStart - start the incorporation protocol (VxWorks option)** This routine starts the incorporation protocol.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK, is successful.* NOMANUAL*/STATUS distIncoStart    (    int    waitNTicks        /* ticks distNodeBootstrap() should wait */    )    {    DIST_PKT_INCO    pktInco;    DIST_NODE_ID     nodeId;    STATUS           status, s1, s2, s3, s4;    DIST_PKT_INCO    pktUpNow;    s1 = distNetServUp (DIST_PKT_TYPE_INCO);    /* incorporation service   */    s2 = distNetServUp (DIST_PKT_TYPE_DGDB);    /* group database service  */    s3 = distNetServUp (DIST_PKT_TYPE_GAP);     /* group agreement service */    s4 = distNetServUp (DIST_PKT_TYPE_DNDB);    /* name database service   */    if (s1 == ERROR || s2 == ERROR || s3 == ERROR || s4 == ERROR)        return (ERROR);#ifdef DIST_DIAGNOSTIC    distLog ("distIncoStart: bootstrapping\n");#endif    distNodeBootstrap (waitNTicks);#ifdef DIST_DIAGNOSTIC    distLog ("distIncoStart: bootstrapping done--ok\n");#endif    if (distNodeGetGodfatherId (&nodeId) == ERROR)        {        /*         * Since we found no godfather, we have to assume,         * that we got up first. There is no need to try         * to send an INCO_REQ.         * But there are some rare situations, where some         * other nodes that are also booting, do know about         * us, unless we don't. They have registrated us in         * BOOTING state. Therefore we send an INCO_UPNOW         * broadcast, to force them to shift our state to         * OPERATIONAL.         */        s1 = distNetServUp (DIST_PKT_TYPE_MSG_Q);     /* message queue serv */        s2 = distNetServUp (DIST_PKT_TYPE_MSG_Q_GRP); /* message group serv */        if (s1 == ERROR || s2 == ERROR)            distPanic ("distIncoInput/DONE: Cannot activate service.\n");        distNodeLocalSetState (DIST_NODE_STATE_OPERATIONAL);        pktUpNow.pktIncoHdr.pktType = DIST_PKT_TYPE_INCO;        pktUpNow.pktIncoHdr.pktSubType = DIST_PKT_TYPE_INCO_UPNOW;        distNetSend (DIST_IF_BROADCAST_ADDR,                     (DIST_PKT *) &pktUpNow, sizeof (pktUpNow),                      WAIT_FOREVER, DIST_INCO_PRIO);#ifdef DIST_DIAGNOSTIC        distLog ("distIncoStart: incorporation done--we are 1st\n");#endif        return (OK);        }    pktInco.pktIncoHdr.pktType = DIST_PKT_TYPE_INCO;    pktInco.pktIncoHdr.pktSubType = DIST_PKT_TYPE_INCO_REQ;#ifdef DIST_DIAGNOSTIC    distLog ("distIncoStart: sending incorporation request to node 0x%lx\n",            nodeId);#endif    status = distNetSend (nodeId, (DIST_PKT *) &pktInco, sizeof (pktInco),                          WAIT_FOREVER, DIST_INCO_PRIO);    if (status == ERROR)        return (ERROR);#ifdef DIST_DIAGNOSTIC    distLog ("distIncoStart: incorporation request sent--ok\n");#endif    semTake (&distIncoWait4Done, WAIT_FOREVER);#ifdef DIST_DIAGNOSTIC    distLog ("distIncoStart: we are incorporated--ok\n");#endif    return (OK);    }/***************************************************************************** distIncoInput - handle incorporation input (VxFusion option)** This routine handles incorporation input.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: Status of input processing.* NOMANUAL*/LOCAL DIST_STATUS distIncoInput    (    DIST_NODE_ID    nodeIdSrc,    /* source node's Id */    DIST_TBUF_HDR * pTBufHdr      /* the message to process */    )    {    DIST_PKT_INCO       pktInco;    DIST_PKT_INCO       pktDone;    int                 pktLen = pTBufHdr->tBufHdrOverall;    DIST_PKT_INCO       pktUpNow;    STATUS              s1, s2, s3;    DIST_NODE_DB_NODE * pNode;#ifdef DIST_DIAGNOSTIC    STATUS    status;#endif    if (pktLen != sizeof (DIST_PKT_INCO))        distPanic ("distIncoInput: packet too short\n");    distTBufCopy (DIST_TBUF_GET_NEXT (pTBufHdr), 0, (char *)&pktInco, pktLen);    switch (pktInco.pktIncoHdr.pktSubType)        {        case DIST_PKT_TYPE_INCO_REQ:            {            /*             * A new node introduces itself. Send name database             * and group information.             */#ifdef DIST_DIAGNOSTIC            distLog ("distIncoInput/REQ: node 0x%lx wants to get incorporated\n",                     nodeIdSrc);#endif#ifdef DIST_INCO_REPORT            printf ("distIncoInput: we are in state %d\n",                    distNodeLocalGetState());#endif            if (msgQDistGrpBurst (nodeIdSrc) == ERROR)                {#ifdef DIST_DIAGNOSTIC                distLog ("distIncoInput/REQ: group db update failed\n");#endif                break;                }            if (distNameBurst (nodeIdSrc) == ERROR)                {#ifdef DIST_DIAGNOSTIC                distLog ("distIncoInput/REQ: name db update failed\n");#endif                break;                }            distNodeOperational (nodeIdSrc);            /* Signal DONE to godchild. */            pktDone.pktIncoHdr.pktType = DIST_PKT_TYPE_INCO;            pktDone.pktIncoHdr.pktSubType = DIST_PKT_TYPE_INCO_DONE;#ifdef DIST_DIAGNOSTIC            status = distNetSend (nodeIdSrc, (DIST_PKT *) &pktDone,                                  sizeof (pktDone), WAIT_FOREVER,                                  DIST_INCO_PRIO);            if (status == ERROR)                distLog ("distIncoInput/REQ: failed sending DONE\n");            else                distLog ("distIncoInput/REQ: node 0x%lx is updated, DONE sent\n",                         nodeIdSrc);#else            distNetSend (nodeIdSrc, (DIST_PKT *) &pktDone,                         sizeof (pktDone), WAIT_FOREVER, DIST_INCO_PRIO);#endif            break;            }        case DIST_PKT_TYPE_INCO_DONE:            {#ifdef DIST_INCO_REPORT            printf ("distIncoInput/DONE: we are incorporated\n");#endif            distNodeLocalSetState (DIST_NODE_STATE_OPERATIONAL);            s1 = distNetServUp (DIST_PKT_TYPE_MSG_Q);            s2 = distNetServUp (DIST_PKT_TYPE_GAP);            s3 = distNetServUp (DIST_PKT_TYPE_MSG_Q_GRP);            if (s1 == ERROR || s2 == ERROR || s3 == ERROR)                distPanic ("distIncoInput/DONE: Cannot activate service.\n");            pktUpNow.pktIncoHdr.pktType = DIST_PKT_TYPE_INCO;            pktUpNow.pktIncoHdr.pktSubType = DIST_PKT_TYPE_INCO_UPNOW;#ifdef DIST_DIAGNOSTIC            status = distNetSend (DIST_IF_BROADCAST_ADDR,                                  (DIST_PKT *) &pktUpNow, sizeof (pktUpNow),                                  WAIT_FOREVER, DIST_INCO_PRIO);            if (status == ERROR)                distLog ("distIncoInput/DONE: failed sending UPNOW\n");#else            distNetSend (DIST_IF_BROADCAST_ADDR,                         (DIST_PKT *) &pktUpNow, sizeof (pktUpNow),                         WAIT_FOREVER, DIST_INCO_PRIO);#endif            semGive (&distIncoWait4Done);            break;            }        case DIST_PKT_TYPE_INCO_UPNOW:            {#ifdef DIST_INCO_REPORT            printf ("distIncoInput/UPNOW: node 0x%lx is up now\n",                    nodeIdSrc);#endif            pNode = distNodeOperational (nodeIdSrc);            if (pNode == NULL)                {                /*                 * This should never happen. But if it happens,                 * try to create that node.                 */#ifdef DIST_DIAGNOSTIC                distLog ("distIncoInput/UPNOW: UPNOW from unknown node 0x%lx\n",                        nodeIdSrc);                pNode =                    distNodeCreate (nodeIdSrc, DIST_NODE_STATE_OPERATIONAL);                if (pNode == NULL)                    distLog ("distIncoInput/UPNOW: creation of node failed\n");#else                distNodeCreate (nodeIdSrc, DIST_NODE_STATE_OPERATIONAL);#endif                }            break;            }        default:#ifdef DIST_DIAGNOSTIC            distLog ("distIncoInput: unknown subtype (%d) of INCO protocol\n",                    pktInco.pktIncoHdr.pktSubType);#endif            return (DIST_INCO_STATUS_PROTOCOL_ERROR);        }    return (DIST_INCO_STATUS_OK);    }/***************************************************************************** distIncoIntro - introduce this node to the system (VxFusion option)** This routine introduces this node to the system.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK* NOMANUAL*/STATUS distIncoIntro (void)    {    return (OK);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频在线免费观看| 另类小说图片综合网| 国产亚洲精品bt天堂精选| 欧美剧情片在线观看| 欧美日韩综合在线免费观看| 欧美日韩中文一区| 91精品视频网| 精品国产制服丝袜高跟| 精品国产乱码久久久久久蜜臀| 欧美精品少妇一区二区三区| 日韩一区二区麻豆国产| 日韩欧美一级二级三级久久久| 在线播放中文一区| 精品国产一区二区三区av性色 | 亚洲男人天堂av| 国产精品大尺度| 亚洲一区在线观看免费观看电影高清| 亚洲男人的天堂在线观看| 日韩在线一区二区三区| 国产精品性做久久久久久| 99精品视频在线播放观看| 欧美日韩精品三区| 久久久91精品国产一区二区精品 | 美女在线视频一区| 国产精品综合二区| 91国产福利在线| 欧美成人福利视频| 国产精品乱人伦| 视频在线观看一区| 丁香婷婷综合网| 91精品福利在线一区二区三区| 26uuu色噜噜精品一区二区| 亚洲欧美一区二区久久| 麻豆91在线播放免费| 91麻豆国产香蕉久久精品| 精品欧美一区二区久久| 一区二区三区蜜桃| 国产成人av福利| 91国产免费观看| 亚洲国产电影在线观看| 麻豆精品视频在线观看| 国产精品盗摄一区二区三区| 久久久久久麻豆| 一区二区三区中文字幕在线观看| 精品一区二区三区视频在线观看| 99re热视频这里只精品| 精品久久久久久亚洲综合网 | 久久午夜免费电影| 亚洲欧美日韩在线播放| 国产在线一区观看| 在线电影一区二区三区| 自拍偷拍欧美激情| 懂色av一区二区三区免费观看| 日韩欧美亚洲国产另类| 亚洲国产日韩一区二区| 99久久久国产精品| 日本一区二区三区国色天香| 久久99蜜桃精品| 91精品国产色综合久久不卡蜜臀| 亚洲黄色免费网站| 91丨九色丨尤物| 国产v日产∨综合v精品视频| 久久精品一区八戒影视| 亚洲一区二区免费视频| 91一区二区在线| 国产精品水嫩水嫩| 国产成人一区二区精品非洲| 久久无码av三级| 国产乱人伦偷精品视频不卡| 久久蜜臀精品av| 黑人精品欧美一区二区蜜桃| 日韩欧美国产精品一区| 久久er精品视频| 精品福利在线导航| 国产酒店精品激情| 中文一区一区三区高中清不卡| 粉嫩aⅴ一区二区三区四区五区 | 精品一区二区综合| 欧美mv日韩mv国产网站app| 免费观看在线色综合| 精品久久久久久久久久久院品网| 国产传媒一区在线| 欧美日韩在线播放三区| 亚洲电影第三页| 国产精品欧美一区喷水| 成人激情免费视频| 国产精品丝袜91| 91福利在线播放| 五月综合激情婷婷六月色窝| 精品国产露脸精彩对白| 成人免费av在线| 亚洲日本va午夜在线影院| 欧美在线影院一区二区| 日韩激情在线观看| 久久蜜桃香蕉精品一区二区三区| 成人一区二区三区在线观看| 樱花影视一区二区| 日韩视频免费观看高清完整版在线观看 | 久久综合成人精品亚洲另类欧美| 国产精品自产自拍| 亚洲欧洲韩国日本视频| 欧美区视频在线观看| 国内精品伊人久久久久av一坑| 久久久精品国产99久久精品芒果| 99热精品国产| 久久精品国产精品亚洲综合| 国产精品美女久久福利网站| 欧美日韩一区二区在线观看视频 | 国产激情一区二区三区四区| 91精品欧美一区二区三区综合在| 日韩激情视频网站| 国产视频一区二区三区在线观看| 91美女精品福利| 男女男精品网站| 国产精品久久久久婷婷| 欧美肥胖老妇做爰| 成人精品国产免费网站| 图片区小说区区亚洲影院| 欧美精品一区视频| 欧美日韩一区二区在线视频| 国产成人av电影在线播放| 日韩av中文字幕一区二区三区| 国产欧美日韩不卡免费| 在线91免费看| 91女厕偷拍女厕偷拍高清| 久久97超碰色| 香蕉乱码成人久久天堂爱免费| 国产精品全国免费观看高清 | 亚洲永久免费av| 日韩女优av电影在线观看| 色呦呦网站一区| 国产精品1024| 捆绑调教一区二区三区| 亚洲国产精品欧美一二99| 亚洲欧洲日本在线| 国产人伦精品一区二区| 日韩免费高清av| 欧美一级二级三级蜜桃| 一本大道av伊人久久综合| 不卡免费追剧大全电视剧网站| 国产原创一区二区三区| 久久国产生活片100| 日本不卡高清视频| 青青草91视频| 日本少妇一区二区| 日本亚洲电影天堂| 丝袜美腿亚洲一区二区图片| 亚洲图片欧美视频| 亚洲一区二区视频| 亚洲精品国久久99热| aaa欧美色吧激情视频| 亚洲香蕉伊在人在线观| 亚洲精品日日夜夜| 亚洲精品高清在线| 亚洲免费观看高清在线观看| 国产精品视频一二| 亚洲伦理在线精品| 亚洲精品成人精品456| 亚洲黄色免费电影| 亚洲高清免费观看高清完整版在线观看| 亚洲精品欧美专区| 亚洲一区二区欧美日韩| 日日夜夜一区二区| 麻豆成人免费电影| 成人一区二区在线观看| av福利精品导航| 欧美揉bbbbb揉bbbbb| 日韩一区二区三区四区| 久久久久国产精品麻豆ai换脸 | 国产传媒久久文化传媒| 国产宾馆实践打屁股91| 99热精品一区二区| 欧美日韩另类国产亚洲欧美一级| 欧美一级爆毛片| 中文字幕第一区综合| 亚洲小少妇裸体bbw| 精品一区二区精品| 成人午夜视频福利| 欧美日本不卡视频| 中文av一区二区| 亚洲国产精品麻豆| 国产精品一区不卡| 欧美伊人久久久久久久久影院 | 久久久五月婷婷| 一区二区三区在线免费播放| 日韩影院精彩在线| 成人在线视频一区| 337p亚洲精品色噜噜| 国产精品大尺度| 精品一区二区三区免费观看| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 日韩一区欧美二区| 国产精品1区2区| 7777精品伊人久久久大香线蕉完整版 | 91日韩在线专区| 日韩欧美中文一区| 亚洲永久免费av| 成人午夜伦理影院| 精品国产91乱码一区二区三区| 一区二区三区波多野结衣在线观看 |