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

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

?? distincolib.c

?? vxworks的源代碼
?? C
字號:
/* 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);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美浪妇xxxx高跟鞋交| 亚洲天堂精品视频| 亚洲欧洲日本在线| 日韩电影一二三区| 99久久99久久精品国产片果冻 | 国产不卡在线视频| 欧美日韩另类一区| 亚洲日本一区二区| 成熟亚洲日本毛茸茸凸凹| 制服丝袜激情欧洲亚洲| 亚洲乱码国产乱码精品精的特点| 国产一区二区精品久久91| 宅男噜噜噜66一区二区66| 艳妇臀荡乳欲伦亚洲一区| av高清久久久| 国产午夜亚洲精品理论片色戒| 麻豆一区二区三| 欧美一区日本一区韩国一区| 依依成人精品视频| 色系网站成人免费| 亚洲欧洲精品一区二区精品久久久 | 风间由美一区二区三区在线观看 | 欧美精品一区二区高清在线观看| 欧美区一区二区三区| 成人禁用看黄a在线| 欧美日韩成人激情| 亚洲国产成人在线| 韩国视频一区二区| 欧美丰满少妇xxxbbb| 亚洲丝袜精品丝袜在线| 国产成人av电影在线播放| 久久亚洲精品小早川怜子| 日韩成人一级片| 在线观看视频欧美| 亚洲视频免费在线观看| 秋霞午夜av一区二区三区| 欧美性生活影院| 亚洲日本免费电影| 成人sese在线| 欧美国产成人在线| 国产福利一区二区三区| 欧美成人vr18sexvr| 日日噜噜夜夜狠狠视频欧美人| 国产自产高清不卡| 久久伊人蜜桃av一区二区| 日本成人在线不卡视频| 欧美美女喷水视频| 丝袜国产日韩另类美女| 欧美日韩一本到| 亚洲午夜久久久久| 欧美午夜电影网| 三级影片在线观看欧美日韩一区二区| 色一情一伦一子一伦一区| 亚洲欧美日韩在线不卡| 在线一区二区观看| 亚洲国产精品视频| 99精品一区二区| 亚洲国产精品久久艾草纯爱| 欧美精三区欧美精三区| 九色综合狠狠综合久久| 久久天天做天天爱综合色| 国产精品911| 国产精品高清亚洲| 欧美无砖砖区免费| 亚洲一区二区三区四区五区黄 | 日韩一区二区三区四区 | 国产精品久久夜| 一本久久精品一区二区| 亚洲一区日韩精品中文字幕| 欧美日韩成人一区| 九九精品一区二区| 国产精品国产三级国产普通话三级| 99麻豆久久久国产精品免费优播| 亚洲视频小说图片| 在线不卡一区二区| 国产精品1区二区.| 亚洲成在线观看| 精品国产一区二区三区忘忧草| 丁香亚洲综合激情啪啪综合| 一级日本不卡的影视| 91精品免费观看| 国产不卡视频在线播放| 亚洲一线二线三线视频| 欧美日韩欧美一区二区| 亚洲国产日产av| 国产片一区二区| 欧美日韩在线三区| 国产成人精品在线看| 亚洲一区影音先锋| 久久精品亚洲一区二区三区浴池| 在线精品亚洲一区二区不卡| 精品一区二区三区免费观看 | 欧美精品丝袜久久久中文字幕| 久久电影网电视剧免费观看| 亚洲欧洲一区二区三区| 欧美人狂配大交3d怪物一区| 国产成人av电影在线| 婷婷成人综合网| 国产精品青草综合久久久久99| 欧美日韩国产在线观看| 国产丶欧美丶日本不卡视频| 激情深爱一区二区| 蜜桃传媒麻豆第一区在线观看| 亚洲精品国产视频| 欧美一区二区在线视频| 色综合欧美在线| 成人亚洲精品久久久久软件| 免费的国产精品| 亚洲国产精品精华液网站| 亚洲天堂av一区| 国产女人水真多18毛片18精品视频| 欧美一区二区在线视频| 欧美日韩一区二区在线观看| 色综合久久久久综合体桃花网| 国内一区二区视频| 免费久久精品视频| 日韩综合小视频| 亚洲视频一区二区免费在线观看| 中文字幕成人av| 国产午夜精品久久久久久久| 欧美电影免费观看高清完整版在线 | 一区二区三区蜜桃网| 国产蜜臀97一区二区三区| 国产精品久久看| 一区二区三区.www| 亚洲一二三四在线| 午夜影院久久久| 欧美aaa在线| 国内国产精品久久| 成人免费观看av| 欧美亚洲一区二区在线| 色婷婷精品大视频在线蜜桃视频| www.在线成人| 91小宝寻花一区二区三区| 国产激情一区二区三区四区| 午夜精品一区二区三区三上悠亚| 亚洲女与黑人做爰| 亚洲狠狠爱一区二区三区| 一区二区三区美女视频| 亚洲成人免费影院| 蜜臀av一级做a爰片久久| 久久精品国产第一区二区三区| 久久精品国产澳门| 国产成人av一区二区三区在线观看| 国产二区国产一区在线观看| 成人免费电影视频| 在线一区二区观看| 91麻豆蜜桃一区二区三区| 国内欧美视频一区二区| 91老师片黄在线观看| 91网站最新网址| 欧美日韩久久久一区| 日韩欧美资源站| 中文字幕国产精品一区二区| 亚洲欧美经典视频| 欧美激情综合五月色丁香| 中文字幕一区二区三区色视频| 亚洲精品欧美激情| 亚洲国产成人av| 精东粉嫩av免费一区二区三区| 国产一区欧美日韩| 99re这里都是精品| 欧洲精品中文字幕| 国产嫩草影院久久久久| 亚洲成av人片在www色猫咪| 激情丁香综合五月| 一本色道亚洲精品aⅴ| 日韩一卡二卡三卡国产欧美| 久久久www免费人成精品| 亚洲综合免费观看高清完整版在线 | 国产性做久久久久久| 亚洲精品精品亚洲| 成人深夜在线观看| 日韩视频免费观看高清完整版| 国产精品久久久久一区二区三区 | 亚洲制服欧美中文字幕中文字幕| 亚洲图片一区二区| 国产一区二区毛片| 91国产精品成人| 久久久美女毛片| 性欧美大战久久久久久久久| 岛国av在线一区| 欧美性色aⅴ视频一区日韩精品| 2021中文字幕一区亚洲| 亚洲免费av观看| 国产一区二区三区免费播放| 欧美性猛交一区二区三区精品| 国产免费久久精品| 亚洲成人资源在线| av高清不卡在线| 国产日韩欧美亚洲| 亚洲高清免费视频| 色综合天天狠狠| 亚洲国产成人在线| 国产在线乱码一区二区三区| 欧美电影在哪看比较好| 亚洲一区二区不卡免费| 99re6这里只有精品视频在线观看| 亚洲精品在线电影| 天天色 色综合|