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

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

?? distnetlib.c

?? vxworks操作系統的源代碼 供研究學習
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* distNetLib - distributed objects network layer (VxFusion option) *//* Copyright 1999 - 2002 Wind River Systems, Inc. *//*modification history--------------------01k,18apr02,jws  fix SPR74878 (not lock node database properly)01j,23oct01,jws  fix compiler warnings (SPR 71117)01i,04oct01,jws  final fixes for SPR 3477001h,27sep01,p_r  Fixes for SPR#3477001g,24may99,drm  added vxfusion prefix to VxFusion related includes01f,23feb99,drm  library documentation update01e,22feb99,drm  added documentation for library and distNetInput() function01d,12aug98,drm  added #include stmt for distObjTypeP.h01c,08aug98,drm  added code to set broadcast flag when sending broadcast msgs01b,20may98,drm  removed some warning messages by initializing pointers to NULL01a,05sep97,ur   written.*//*DESCRIPTIONThis library contains the distributed objects network layer.  The network layerputs messages into telegram buffers and reassembles them from telegram buffers.  When a message exceeds the space allocated for message data in a telegram, the network layer fragments the message into multiple telegram buffers, and reassembles a single message from multiple telegram buffers.  After placing a message into a telegram buffer(s), this layer calls theadapter's send routine and sends a telegram out over thetransport.  If the message has to be fragmented into more than one telegram buffer, the adapter send routine is called once for each buffer used.Upon receiving a telegram from a remote node, an adapter must call thislibrary's distNetInput() routine to forward a telegram buffer to VxFusion.AVAILABILITYThis module is distributed as a component of the unbundled distributedmessage queues option, VxFusion.INCLUDE FILES: distNetLib.hSEE ALSO: distIfLib*/#include "vxWorks.h"#if defined (DIST_NET_REPORT) || defined (DIST_DIAGNOSTIC)#include "stdio.h"#endif#include "errnoLib.h"#include "string.h"#include "taskLib.h"#include "semLib.h"#include "netinet/in.h"#include "private/semLibP.h"#include "private/distObjTypeP.h"#include "vxfusion/distLib.h"#include "vxfusion/distIfLib.h"#include "vxfusion/distStatLib.h"#include "vxfusion/private/distNetLibP.h"#include "vxfusion/private/distNodeLibP.h"#include "vxfusion/private/distTBufLibP.h"#include "vxfusion/private/distPktLibP.h"/* defines */#ifndef MAX#define MAX(a, b) (((a) < (b)) ? (b) : (a))#endif#ifndef MIN#define MIN(a, b) (((a) > (b)) ? (b) : (a))#endifDIST_SERV_NODE    servTable[DIST_SERV_MAX];/* locals */LOCAL BOOL       distNetLibInstalled = FALSE;LOCAL FUNCPTR    distNetServiceHook = NULL;/* local prototypes */LOCAL void distNetServTask (DIST_SERV_FUNC servInput,                            DIST_SERV_NODE *servNode);LOCAL STATUS distNetServCall (int servId, DIST_TBUF_HDR *pDeliver);/***************************************************************************** distNetLibInit - 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 distNetLibInit (void)    {    }/***************************************************************************** distNetInit - initialize server table (VxFusion option)** This routine initializes the server table.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: N/A* NOMANUAL*/void distNetInit (void)    {    int i;    bzero ((char *) &servTable[0], sizeof(servTable));    for (i = 0; i < DIST_SERV_MAX; i++)        {        servTable[i].servTaskPrio = servTable[i].servNetPrio = (-1);        }    distNetLibInstalled = TRUE;    }/***************************************************************************** distNetServAdd - add a service (VxFusion option)** This routine adds a service to the server table and spawns a task to* implement the service.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK, if successful.* NOMANUAL*/STATUS distNetServAdd    (    int            servId,          /* id of service to add */    DIST_SERV_FUNC servInput,       /* service input function to call */    char *         servTaskName,    /* name of service task */    int            servNetPrio,     /* priority of service on the network */    int            servTaskPrio,    /* priority of service task */    int            servTaskStackSz  /* stack size for service task */    )    {    DIST_SERV_NODE    *pServNode = (DIST_SERV_NODE *) &servTable[servId];    int        taskPrio;    int        tid;    if (!distNetLibInstalled || servId < 0 || servId > DIST_SERV_MAX - 1)        return (ERROR);    semBInit (&pServNode->servQLock, SEM_Q_FIFO, SEM_FULL);    semBInit (&pServNode->servWait4Jobs, SEM_Q_FIFO, SEM_EMPTY);    pServNode->servId = servId;    pServNode->servUp = FALSE;    pServNode->pServQ = NULL;    if (pServNode->servTaskPrio == -1)        pServNode->servTaskPrio = servTaskPrio;    if (pServNode->servNetPrio == -1)        pServNode->servNetPrio = servNetPrio;    taskPrio = pServNode->servTaskPrio;    tid = taskSpawn (servTaskName,                     taskPrio,                     VX_SUPERVISOR_MODE | VX_UNBREAKABLE,                     servTaskStackSz,                     (FUNCPTR) distNetServTask,                     (int) servInput,                     (int) pServNode,                     0, 0, 0, 0, 0, 0, 0, 0);    if (tid == ERROR)        return (ERROR);    pServNode->servTaskId = tid;    return (OK);    }/***************************************************************************** distNetServTask - service task (VxFusion option)** This is the common entry point for all network service tasks. It* calls the individual service functions.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: N/A* NOMANUAL*/LOCAL void distNetServTask    (    DIST_SERV_FUNC   servInput,     /* function to process input */    DIST_SERV_NODE * pServNode      /* server node */    )    {    DIST_TBUF_HDR * pDeliver;    DIST_NODE_ID    nodeSrcId;    DIST_STATUS     dStatus;    FOREVER        {        semTake (&pServNode->servWait4Jobs, WAIT_FOREVER);        while (pServNode->pServQ)            {            semTake (&pServNode->servQLock, WAIT_FOREVER);            DIST_TBUF_HDR_DEQUEUE (pServNode->pServQ, pDeliver);            semGive (&pServNode->servQLock);            nodeSrcId = pDeliver->tBufHdrSrc;            if ((dStatus = servInput (nodeSrcId, pDeliver)) != OK)                {#ifdef DIST_NET_REPORT                printf ("distNetServTask/#%d: service task returned %d\n",                        pServNode->servId, dStatus);#endif                  if (distNetServiceHook)                    (* distNetServiceHook) (pServNode->servId, dStatus);                }                            /* locking probably not required, but doesn't cost much */            distNodeDbLock ();            DIST_TBUF_FREEM (pDeliver);            distNodeDbUnlock ();            }        }    }/***************************************************************************** distNetServConfig - configure service (VxFusion option)** This routine is used to change a service's task and network priority.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK, if successful.* NOMANUAL*/STATUS distNetServConfig    (    int        servId,      /* ID of service to configure */    int        taskPrio,    /* new task priority */    int        netPrio      /* new network priority */    )    {    DIST_SERV_NODE * pServNode = (DIST_SERV_NODE *) &servTable[servId];    if (servId >= 0 && servId < DIST_SERV_MAX)        {        if (netPrio != -1)            {            if (netPrio < 0 || netPrio > 7)                return (ERROR);            pServNode->servNetPrio = netPrio;            }        if (taskPrio != -1)            {            if (taskPrio < 0 || taskPrio > 255)                return (ERROR);            pServNode->servTaskPrio = taskPrio;            if (DIST_NET_SERV_INST (servId))                return (taskPrioritySet (pServNode->servTaskId, taskPrio));            }        return (OK);        }    return (ERROR);    }/***************************************************************************** distNetServUp - change state of service to up (VxFusion option)** This routine marks to state of a service as UP.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: ERROR, if no such service exists.* NOMANUAL*/STATUS distNetServUp    (    int servId      /* ID of service */    )    {    DIST_SERV_NODE * pServNode;    if (servId >= 0  &&  servId < DIST_SERV_MAX                     &&  DIST_NET_SERV_INST (servId))        {        pServNode = (DIST_SERV_NODE *) &servTable[servId];        pServNode->servUp = TRUE;        return (OK);        }    return (ERROR);    }/***************************************************************************** distNetServDown - change state of service to down (VxFusion option)** This routine changes the state of a service to DOWN.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: ERROR, if no such service exists.* NOMANUAL*/STATUS distNetServDown    (    int servId    /* ID of service */    )    {    DIST_SERV_NODE * pServNode;    if (servId >= 0 && servId < DIST_SERV_MAX                    && DIST_NET_SERV_INST (servId))    {    pServNode = (DIST_SERV_NODE *) &servTable[servId];    pServNode->servUp = FALSE;    return (OK);    }    return (ERROR);    }/***************************************************************************** distNetServCall - call a service with an incoming packet (VxFusion option)** This routine passes incoming data to a service.** AVAILABILITY* This routine is distributed as a component of the unbundled distributed* message queues option, VxFusion.** RETURNS: OK, if successful.* NOMANUAL*/LOCAL STATUS distNetServCall    (    int             servId,      /* ID of service */    DIST_TBUF_HDR * pDeliver     /* the message */    )    {    DIST_SERV_NODE * pServNode;    if (servId >= 0 && servId < DIST_SERV_MAX                    && DIST_NET_SERV_INST (servId))        {        pServNode = (DIST_SERV_NODE *) &servTable[servId];        /*         * Although the service is not up yet, we return OK and         * force an acknowledge for the packet. We have to keep

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久精品国产| 中文字幕不卡在线播放| 国产精品久久久久精k8| 日韩精品乱码av一区二区| 99久久伊人网影院| 日韩欧美国产三级| 亚洲成av人片www| 91麻豆国产自产在线观看| 久久久精品欧美丰满| 免费看黄色91| 欧美午夜寂寞影院| 亚洲欧美另类在线| 精品一区二区精品| 日韩欧美电影一二三| 亚洲国产精品久久艾草纯爱| 91小宝寻花一区二区三区| 久久蜜桃av一区二区天堂| 精品影视av免费| 91精品国产乱码久久蜜臀| 亚洲午夜久久久久久久久电影网 | 777久久久精品| 日韩一区在线播放| 成人一区二区三区中文字幕| 337p日本欧洲亚洲大胆色噜噜| 亚洲国产cao| 欧美亚洲自拍偷拍| 亚洲国产裸拍裸体视频在线观看乱了| www.久久精品| 最新国产成人在线观看| 99久久免费精品高清特色大片| 日本一区二区成人| 成人福利在线看| 亚洲欧美韩国综合色| 91丨九色丨黑人外教| 亚洲欧美日韩国产手机在线| 色婷婷久久久亚洲一区二区三区| 国产精品成人免费精品自在线观看| 成人综合激情网| 亚洲精品国产无天堂网2021| 一道本成人在线| 偷拍自拍另类欧美| 日韩一级在线观看| 国产在线视视频有精品| 国产情人综合久久777777| av福利精品导航| 亚洲一级片在线观看| 91麻豆精品国产91久久久久久| 久久精品国产一区二区三区免费看 | 色婷婷综合五月| 一区二区不卡在线播放| 91麻豆精品国产自产在线观看一区| 久久黄色级2电影| 国产欧美日本一区二区三区| 91精品91久久久中77777| 日本亚洲一区二区| 久久伊人蜜桃av一区二区| 成人av午夜影院| 亚洲一区二区三区四区在线观看 | 欧美日韩国产系列| 国内精品伊人久久久久av一坑 | 国产91富婆露脸刺激对白| 亚洲男帅同性gay1069| 欧美人牲a欧美精品| 国产馆精品极品| 亚洲第一久久影院| 久久品道一品道久久精品| 色94色欧美sute亚洲13| 裸体在线国模精品偷拍| 中文字幕一区二区在线观看| 91麻豆精品国产91久久久资源速度| 国产高清不卡二三区| 亚洲高清视频中文字幕| 国产亚洲一区二区三区在线观看| 色综合色狠狠综合色| 美女视频网站黄色亚洲| 一区二区欧美国产| 国产肉丝袜一区二区| 欧美精品第1页| 91在线一区二区| 美国毛片一区二区| 亚洲一卡二卡三卡四卡| 中文字幕的久久| 精品免费99久久| 欧美精品日韩综合在线| 91网站在线播放| 国产成人免费视频网站| 免费一级片91| 亚洲电影中文字幕在线观看| 国产精品毛片久久久久久| 欧美成人精精品一区二区频| 欧美视频精品在线观看| av在线不卡网| 国产精品综合二区| 免费成人在线观看| 日韩国产欧美在线视频| 一个色综合网站| 亚洲精品视频免费看| 国产精品欧美极品| 国产欧美一区二区在线观看| 26uuu另类欧美亚洲曰本| 日韩欧美123| 欧美大片一区二区三区| 91精品综合久久久久久| 在线观看欧美日本| av一区二区三区在线| av亚洲精华国产精华| 国v精品久久久网| 国产成人免费在线观看不卡| 国产综合久久久久影院| 国产黄色精品网站| 国产成人综合网站| 国产成a人亚洲精| 国产精品一区免费在线观看| 国产在线麻豆精品观看| 精品影视av免费| 国产精品一区免费在线观看| 国产乱码精品一品二品| 国产福利一区二区三区在线视频| 国产丶欧美丶日本不卡视频| 国产成人精品一区二区三区网站观看| 国产精品亚洲一区二区三区在线| 精品一区二区三区免费| 国产成人av自拍| 99视频超级精品| 欧美在线影院一区二区| 91麻豆精品国产91久久久久久久久| 欧美一级二级在线观看| 久久这里只精品最新地址| 亚洲国产成人午夜在线一区| 亚洲男人的天堂在线aⅴ视频| 亚洲欧美日韩国产成人精品影院| 亚洲自拍另类综合| 亚洲成av人片一区二区三区| 久热成人在线视频| aaa欧美色吧激情视频| 欧美视频日韩视频在线观看| 欧美一区二区女人| 国产午夜精品一区二区| 亚洲女同一区二区| 轻轻草成人在线| 丰满亚洲少妇av| 欧美色精品在线视频| 精品久久99ma| 中文字幕日本不卡| 日av在线不卡| 成人美女在线观看| 91精品国产91久久久久久一区二区| 久久久高清一区二区三区| 亚洲黄色av一区| 韩国av一区二区三区在线观看| 高清不卡一区二区在线| 欧美三级韩国三级日本一级| 欧美电影精品一区二区| 国产精品久99| 久久丁香综合五月国产三级网站 | 国产成人啪免费观看软件 | 国产午夜三级一区二区三| 亚洲欧美经典视频| 国产米奇在线777精品观看| 色88888久久久久久影院按摩| 91精品国产免费久久综合| 欧美韩日一区二区三区四区| 亚洲h动漫在线| bt欧美亚洲午夜电影天堂| 欧美一级夜夜爽| 亚洲黄色小说网站| 国产成人精品免费看| 日韩欧美专区在线| 亚洲一区影音先锋| 波多野结衣精品在线| 精品久久久久久久久久久久包黑料| 亚洲欧美日韩精品久久久久| 国产精品综合二区| 日韩欧美国产电影| 日韩中文字幕一区二区三区| 色婷婷久久一区二区三区麻豆| 国产欧美一区二区精品秋霞影院| 麻豆国产欧美一区二区三区| 欧美色中文字幕| 亚洲视频一区二区在线观看| 成人免费视频免费观看| 国产视频在线观看一区二区三区| 另类小说一区二区三区| 91精品久久久久久久99蜜桃| 亚洲va韩国va欧美va精品 | 日本人妖一区二区| 欧美少妇xxx| 午夜影院在线观看欧美| 欧美丝袜丝nylons| 亚洲国产综合在线| 欧美色爱综合网| 亚洲成a人v欧美综合天堂 | 久久精品在这里| 国产一区二区三区久久悠悠色av| 91精品国产综合久久精品图片 | 欧美xxxx在线观看| 精品一区二区三区久久| www日韩大片| 高清在线成人网| 国产精品美女久久久久aⅴ国产馆|