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

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

?? 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草一区二区三区| 日韩无一区二区| 99re66热这里只有精品3直播| 国产福利一区二区| 色猫猫国产区一区二在线视频| 92国产精品观看| 亚洲久本草在线中文字幕| 首页国产欧美日韩丝袜| 国产精品538一区二区在线| 日本精品视频一区二区| 亚洲综合在线观看视频| 亚洲资源中文字幕| 欧美日韩中文精品| 久久精品综合网| 无吗不卡中文字幕| 波波电影院一区二区三区| 欧美日韩aaaaaa| 国产精品蜜臀在线观看| 日本不卡一区二区三区高清视频| 99久久免费国产| 夜夜嗨av一区二区三区四季av | 国产91精品精华液一区二区三区 | 国产综合色精品一区二区三区| 欧美最猛黑人xxxxx猛交| 中文一区在线播放| 国产毛片一区二区| 26uuu精品一区二区三区四区在线| 亚洲精品免费看| 欧美一区二区在线观看| 一区二区成人在线视频| 91精品午夜视频| 亚洲动漫第一页| 色先锋久久av资源部| 国产精品毛片久久久久久久| 91久久免费观看| 狠狠色丁香久久婷婷综合丁香| 国产精品高潮久久久久无| 国产做a爰片久久毛片| 最近中文字幕一区二区三区| 成人免费视频一区| 中文字幕精品在线不卡| 在线观看免费成人| 国产99精品在线观看| 蜜桃精品视频在线| 日韩欧美一二三| 麻豆传媒一区二区三区| 亚洲精品免费在线播放| 久久久久久久久伊人| 成人小视频在线观看| 日韩一区精品视频| 亚洲另类在线一区| 日本一区二区三区国色天香| 成人性生交大片| 美女视频一区二区三区| 一个色综合网站| 国产精品久久久久一区二区三区| 欧美一级欧美三级在线观看| 欧美自拍丝袜亚洲| 成人手机电影网| 久久精品99国产精品| 国产欧美精品区一区二区三区| 69堂亚洲精品首页| 色伊人久久综合中文字幕| 国产suv一区二区三区88区| 久久激情五月激情| 日本视频在线一区| 午夜久久久久久电影| 亚洲精品免费在线观看| 亚洲欧美电影一区二区| 色婷婷亚洲综合| 国产成a人亚洲精| 国产乱码精品一区二区三区忘忧草 | 久久久欧美精品sm网站| 欧美一个色资源| 欧美一区二区三区视频免费| 91福利在线免费观看| 91免费观看在线| 午夜久久久影院| 婷婷国产v国产偷v亚洲高清| 一区二区三区精品在线| 亚洲美女视频在线| 亚洲同性gay激情无套| 国产精品电影一区二区| 国产精品第一页第二页第三页| 国产精品美日韩| 亚洲欧美自拍偷拍色图| 91网站在线播放| 91麻豆免费观看| 91国内精品野花午夜精品 | 一区二区三区影院| 亚洲一区二区在线免费观看视频| 亚洲久草在线视频| 性做久久久久久| 国产精品国产成人国产三级| 日韩伦理av电影| 亚洲国产综合视频在线观看| 午夜欧美大尺度福利影院在线看| 免费观看成人av| 国产精品亚洲一区二区三区在线| 成人av资源下载| 久久www免费人成看片高清| 国产一区二区三区国产| 成人国产精品免费| 欧美艳星brazzers| 波多野结衣91| 欧美日韩国产综合久久 | 日本精品免费观看高清观看| 欧美视频一区二区三区在线观看| 91精品国产黑色紧身裤美女| 欧美精品一区二区三区在线播放| 欧美日本一区二区三区| 26uuu色噜噜精品一区| 中文字幕av不卡| 亚洲成人免费视| 国产精品一区二区在线观看网站| 97久久精品人人澡人人爽| 欧美日韩国产综合一区二区| 国产亚洲综合性久久久影院| 亚洲女子a中天字幕| 蜜桃精品视频在线| 91玉足脚交白嫩脚丫在线播放| 91精品国产乱码久久蜜臀| 一区免费观看视频| 免费一区二区视频| 99久久99久久综合| 精品国产伦一区二区三区观看体验| 国产精品不卡一区| 久久国产日韩欧美精品| 91麻豆蜜桃一区二区三区| 精品99一区二区三区| 亚洲一区二区三区在线播放| 国产精品羞羞答答xxdd| 欧美日韩精品系列| 中文无字幕一区二区三区| 日韩不卡免费视频| 91看片淫黄大片一级在线观看| 精品久久久久香蕉网| 日韩精品一区国产麻豆| 亚洲免费观看高清完整版在线观看| 捆绑变态av一区二区三区| 色婷婷国产精品| 国产日韩欧美亚洲| 久久99久久99| 高清不卡在线观看av| 日韩一区和二区| 亚洲精品国产精品乱码不99 | 国产亚洲制服色| 日韩高清电影一区| 一本久久精品一区二区| 国产日韩av一区| 久久国产精品99精品国产| 欧美精品久久久久久久多人混战| 日韩视频一区在线观看| 亚洲一区二区在线观看视频| 99在线精品视频| 日本一区二区三区四区在线视频| 日韩av网站在线观看| 欧美日韩一区三区四区| 亚洲男人天堂一区| 91视频精品在这里| 国产精品久99| 成人综合日日夜夜| 久久久蜜桃精品| 国产成a人亚洲| 中文字幕第一区二区| 国产成人无遮挡在线视频| 久久先锋影音av鲁色资源| 久久国产精品色婷婷| 欧美大度的电影原声| 免费日本视频一区| 日韩欧美国产精品| 久久国产麻豆精品| 26uuu另类欧美亚洲曰本| 九一久久久久久| 久久精品男人天堂av| 国产成人在线视频免费播放| 国产欧美日韩在线看| 成人av在线资源网| 亚洲欧美一区二区三区极速播放| 91网上在线视频| 亚洲高清视频的网址| 制服.丝袜.亚洲.中文.综合| 人禽交欧美网站| 精品国产欧美一区二区| 国产福利精品一区| 亚洲男人的天堂在线观看| 欧美中文字幕亚洲一区二区va在线| 亚洲成人自拍偷拍| 日韩一区二区免费高清| 国产自产2019最新不卡| 欧美激情一区二区三区| 91视视频在线直接观看在线看网页在线看| 中文字幕中文在线不卡住| 欧美无乱码久久久免费午夜一区| 亚洲成人激情自拍| 久久这里只有精品首页| 91丨porny丨中文| 日韩电影一区二区三区四区| xf在线a精品一区二区视频网站| 成人自拍视频在线观看|