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

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

?? smpktlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
** ERRNO: S_smPktLib_LOCK_TIMEOUT*/LOCAL STATUS smPktSllGet    (    SM_SLL_LIST volatile * listLocalAdrs,	/* local addr of packet list */    int                    baseAddr,		/* addr conversion constant */    FUNCPTR                tasRoutine,		/* test-and-set routine addr */    FUNCPTR                tasClearRoutine,	/* test-and-set routine addr */    SM_SLL_NODE **	   pNodeLocalAdrs	/* location to put node addr */    )    {    int                    oldLvl;		/* saved interrupt level */    int			   count;		/* temp value */    SM_SLL_NODE volatile * pNode;		/* pointer to node */    /* Take list lock */    if (SM_LOCK_TAKE ((int *)&(listLocalAdrs->lock), tasRoutine, smPktTasTries,                      &oldLvl) != OK)        {    	errno = S_smPktLib_LOCK_TIMEOUT;        return (ERROR);                         /* can't take lock */        }    /* Get first node from list, if any */    if ((pNode = (SM_SLL_NODE volatile *) ntohl (listLocalAdrs->head)) != NULL)        {        pNode = SM_OFFSET_TO_LOCAL ((int) pNode, baseAddr, SM_SLL_NODE *);                                                /* convert to local address */        listLocalAdrs->head = pNode->next;      /* next node (if any) is head */        count = ntohl (listLocalAdrs->count) - 1;        if (count <= 0)                      /* if list now empty */            {            listLocalAdrs->tail = htonl (0); /*  clear tail pointer */            count = 0;            }        listLocalAdrs->count = htonl (count);        }    CACHE_PIPE_FLUSH ();                        /* CACHE FLUSH   [SPR 68334] */    count = listLocalAdrs->limit;		/* BRIDGE FLUSH  [SPR 68334] */    /* Release list lock */    SM_LOCK_GIVE ((int *)&(listLocalAdrs->lock), tasClearRoutine, oldLvl);    /* Pass node address back to caller */    *pNodeLocalAdrs = (SM_SLL_NODE *) pNode;    /* local node addr, or NULL */    return (OK);    }/******************************************************************************** smPktSllPut - add a shared memory node to a singly-linked list** This routine attempts to add a shared memory node to the specified* singly-linked list.  The node to be added is identified by <nodeLocalAdrs>.* Unless the list has reached its maximum number of entries, the node* will be added at the tail of the list.  The bus address of the node is* used in the list entry.** This routine uses the specified test-and-set function, <tasRoutine>, to* obtain exclusive access to the linked list lock.  If the lock cannot* be acquired within the number of tries specified by the smPktTasTries* global variable, this routine will return ERROR.** If the list already contains its maximum number of node entries, this* routine will return ERROR.** If <pListWasEmpty> is non-null and the node is successfully added* to the list, this routine will set the BOOL pointed to by* <pListWasEmpty> to TRUE if there were no previous nodes in the list.** RETURNS: OK, or ERROR if packet ptr is NULL, list full, or could* not acquire list lock.** ERRNO: S_smPktLib_LOCK_TIMEOUT, S_smPktLib_LIST_FULL*/LOCAL STATUS smPktSllPut    (    SM_SLL_LIST volatile * listLocalAdrs,	/* local addr of packet list */    int			   base,		/* base address */    FUNCPTR		   tasRoutine,		/* test-and-set routine addr */    FUNCPTR		   tasClearRoutine,	/* test-and-set routine addr */    SM_SLL_NODE volatile * nodeLocalAdrs,	/* local addr of node */    BOOL *		   pListWasEmpty	/* set to true if adding to                                                 * empty list */    )    {    int			   oldLvl;		/* saved interrupt level */    int			   nodeOff;		/* pointer to node */    SM_SLL_NODE volatile * tailLocalAdrs;	/* pointer to list tail node */    nodeLocalAdrs->next = 0;         /* mark node as end of list */    nodeOff = htonl (SM_LOCAL_TO_OFFSET (nodeLocalAdrs, base));    /* Take list lock */    if (SM_LOCK_TAKE ((int *)&(listLocalAdrs->lock), tasRoutine, smPktTasTries,                      &oldLvl) != OK)        {    	errno = S_smPktLib_LOCK_TIMEOUT;        return (ERROR);                         /* can't take lock */        }    /* Add node to list */    if (ntohl (listLocalAdrs->count) >= ntohl (listLocalAdrs->limit))        {        SM_LOCK_GIVE ((int *)&(listLocalAdrs->lock), tasClearRoutine, oldLvl);        errno = S_smPktLib_LIST_FULL;        return (ERROR);                         /* list has max nodes already */        }                                                /* if list previously empty */    if (ntohl (listLocalAdrs->tail) == 0)        {        if (pListWasEmpty != NULL)            *pListWasEmpty = TRUE;        /* node is new head also */        listLocalAdrs->head = nodeOff;        }    else        {        if (pListWasEmpty != NULL)            *pListWasEmpty = FALSE;        tailLocalAdrs = SM_OFFSET_TO_LOCAL (ntohl (listLocalAdrs->tail),                                            base, SM_SLL_NODE volatile *);                                                /* get addr of tail node */        tailLocalAdrs->next = nodeOff;                                             /* link new node to old tail */        }    listLocalAdrs->tail  = nodeOff;                                                /* node is new tail */    listLocalAdrs->count = ntohl (htonl (listLocalAdrs->count) + 1);                                                /* one more node in list */    CACHE_PIPE_FLUSH ();                        /* CACHE FLUSH   [SPR 68334] */    nodeOff = listLocalAdrs->limit;		/* BRIDGE FLUSH  [SPR 68334] */    /* Release list lock */    SM_LOCK_GIVE ((int *)&(listLocalAdrs->lock), tasClearRoutine, oldLvl);    return (OK);    }/******************************************************************************** smPktDetach - detach CPU from shared memory** This routine ends the "attachment" between the calling CPU and* the shared memory area specified by <pSmPktDesc>.  No further shared* memory operations may be performed until a subsequent smPktAttach()* is completed.** RETURNS: OK, or ERROR.** ERRNO: S_smPktLib_NOT_ATTACHED*/STATUS smPktDetach    (    SM_PKT_DESC *	pSmPktDesc,	/* ptr to shared mem descriptor */    BOOL		noFlush		/* true if input queue should not					 * be flushed */    )    {    SM_PKT_CPU_DESC volatile *	pPktCpuDesc;	/* cpu descriptor */    SM_PKT volatile *		pPkt;		/* pointer to input packet */    SM_DESC *			pSmDesc = (SM_DESC *) &pSmPktDesc->smDesc;    int                         tmp;            /* temp storage */    /* Check that this cpu is connected to shared memory */    if (pSmPktDesc->status != SM_CPU_ATTACHED)	{	errno = S_smPktLib_NOT_ATTACHED;	return (ERROR);				/* local cpu is not attached */	}    if (smDetach (pSmDesc) == ERROR)	return (ERROR);    /* get addr of cpu descriptor */    pPktCpuDesc = (SM_PKT_CPU_DESC volatile *) &((pSmPktDesc->cpuLocalAdrs) \                                                  [pSmDesc->cpuNum]);    pPktCpuDesc->status = htonl (SM_CPU_NOT_ATTACHED);/* mark as not attached */    pSmPktDesc->status  = SM_CPU_NOT_ATTACHED;	  /* also mark sh mem descr */    CACHE_PIPE_FLUSH ();                        /* CACHE FLUSH   [SPR 68334] */    tmp = pPktCpuDesc->status;                  /* BRIDGE FLUSH  [SPR 68334] */    if (noFlush == FALSE)			/* flush input queue */	{	FOREVER	    {	    if (smPktSllGet (&(pPktCpuDesc->inputList), pSmDesc->base,			     pSmDesc->tasRoutine, pSmDesc->tasClearRoutine,			     (SM_SLL_NODE **) &pPkt) != OK)		return (ERROR);			/* error getting input packet */	    if (pPkt == NULL)		break;				/* no more input packets */	    if (smPktSllPut (&(pSmPktDesc->hdrLocalAdrs->freeList),			     pSmDesc->base, pSmDesc->tasRoutine,			     pSmDesc->tasClearRoutine,		      	     &(pPkt->header.node), NULL) != OK)		return (ERROR);			/* error adding to free list */	   }	}    return (OK);    }/******************************************************************************** smPktInfoGet - get current status information about shared memory** This routine obtains various pieces of information which describe the* current state of the shared memory area specified by <pSmPktDesc>.  The* current information is returned in a special data structure, SM_PKT_INFO,* whose address is specified by <pInfo>.  The structure must have been* allocated before this routine is called.** RETURNS: OK, or ERROR if this CPU is not attached to shared memory area.** ERRNO: S_smPktLib_NOT_ATTACHED*/STATUS smPktInfoGet    (    SM_PKT_DESC *	pSmPktDesc,	/* shared memory descriptor */    SM_PKT_INFO *	pInfo		/* info structure to fill */    )    {    SM_PKT_MEM_HDR volatile *	pHdr;		/* shared memory header */    SM_PKT_CPU_DESC volatile *	pCpuDesc;	/* cpu descriptor */    int				ix;		/* index variable */    int                         tmp;            /* temp storage */    /* Check that this cpu is connected to shared memory */    if (pSmPktDesc->status != SM_CPU_ATTACHED)	{	errno = S_smPktLib_NOT_ATTACHED;	return (ERROR);				/* local cpu is not attached */	}    if (smInfoGet (&(pSmPktDesc->smDesc), &(pInfo->smInfo)) == ERROR)	return (ERROR);    /* Use local address to get info from shared memory packet header */    pHdr = (SM_PKT_MEM_HDR volatile *) pSmPktDesc->hdrLocalAdrs;    CACHE_PIPE_FLUSH ();                        /* CACHE FLUSH   [SPR 68334] */    tmp = pHdr->maxPktBytes;                    /* PCI bridge bug [SPR 68844]*/    pInfo->maxPktBytes = ntohl (pHdr->maxPktBytes);/* max data bytes per pkt */    pInfo->totalPkts   = ntohl (pHdr->freeList.limit);/* total number */    pInfo->freePkts    = ntohl (pHdr->freeList.count);/* number free */    /* Get count of attached cpu's starting with first cpu table entry */    pCpuDesc = (SM_PKT_CPU_DESC volatile *) pSmPktDesc->cpuLocalAdrs;    pInfo->attachedCpus = 0;    for (ix = 0;  ix < pInfo->smInfo.maxCpus;  ix++)	{	if (ntohl (pCpuDesc->status) == SM_CPU_ATTACHED)	    pInfo->attachedCpus++;	pCpuDesc++;				/* next entry */	}    return (OK);    }/******************************************************************************** smPktCpuInfoGet - get information about a single CPU using shared memory** This routine obtains a variety of information describing the CPU specified* by <cpuNum>.  If <cpuNum> is NONE (-1), this routine returns information* about the local (calling) CPU.  The information is returned in a special* structure, SM_PKT_CPU_INFO, whose address is specified by <pCpuInfo>.  (The* structure must have been allocated before this routine is called.)** RETURNS: OK, or ERROR.** ERRNO: S_smPktLib_NOT_ATTACHED*/STATUS smPktCpuInfoGet    (    SM_PKT_DESC *	pSmPktDesc,	/* pkt descriptor */    int			cpuNum,		/* cpu to get info about */    SM_PKT_CPU_INFO *	pCpuInfo	/* structure to fill */    )    {    SM_PKT_CPU_DESC volatile * pCpuDesc;	/* ptr to cpu descriptor */    int                        tmp;             /* temp storage */    /* Check that the local cpu is connected to shared memory */    if (pSmPktDesc->status != SM_CPU_ATTACHED)	{	errno = S_smPktLib_NOT_ATTACHED;	return (ERROR);				/* local cpu is not attached */	}    if (cpuNum == NONE)	cpuNum = pSmPktDesc->smDesc.cpuNum;    if (smCpuInfoGet (&(pSmPktDesc->smDesc), cpuNum,		      &(pCpuInfo->smCpuInfo)) == ERROR)	return (ERROR);    /* get address of cpu descr */    pCpuDesc = (SM_PKT_CPU_DESC volatile *)&(pSmPktDesc->cpuLocalAdrs[cpuNum]);    CACHE_PIPE_FLUSH ();                        /* CACHE FLUSH   [SPR 68334] */    tmp = pCpuDesc->status;                     /* PCI bridge bug [SPR 68844]*/    pCpuInfo->status  = ntohl (pCpuDesc->status);/* attached or not attached */    /* Get packet counts */    pCpuInfo->inputPkts    = ntohl (pCpuDesc->inputList.count);						/* current pkts in input queue*/    pCpuInfo->maxInputPkts = ntohl (pCpuDesc->inputList.limit);						/* max pkts allowed in queue */    /*     * XXX - free list counts - for future use when cpu's have free lists...     *     * pCpuInfo->freePkts  = ntohl (pCpuDesc->freeList.count);     * pCpuInfo->totalPkts = ntohl (pCpuDesc->freeList.limit);     *     */    pCpuInfo->freePkts  = 0;			/* (future use) */    return (OK);    }/******************************************************************************** smPktBeat - increment packet heartbeat in shared memory anchor** This routine increments the shared memory packet "heartbeat".  The heartbeat* is used by processors using the shared memory packet library to* confirm that the shared memory network is active.  The shared memory* area whose heartbeat is to be incremented is specifed by <pSmPktHdr>, which* is the address of a shared memory packet header region in which the heartbeat* count is maintained.** This routine should be called periodically by the master CPU.** RETURNS: N/A*/void smPktBeat     (    SM_PKT_MEM_HDR *	pSmPktHdr 	/* ptr to sm packet header */    )    {    SM_PKT_MEM_HDR volatile * pPktHdrv = (SM_PKT_MEM_HDR volatile *) pSmPktHdr;    int                       tmp;              /* temp storage */    /* Increment heartbeat */    tmp = pPktHdrv->heartBeat;                  /* PCI bridge bug [SPR 68844]*/    pPktHdrv->heartBeat = htonl (ntohl (pPktHdrv->heartBeat) + 1);    CACHE_PIPE_FLUSH ();                        /* CACHE FLUSH   [SPR 68334] */    tmp = pPktHdrv->heartBeat;                  /* BRIDGE FLUSH  [SPR 68334] */    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲春色中文字幕久久久| 懂色av中文字幕一区二区三区 | 亚洲激情自拍视频| 91麻豆蜜桃一区二区三区| 国产精品免费aⅴ片在线观看| 成人综合婷婷国产精品久久| 亚洲欧洲国产专区| 不卡欧美aaaaa| 亚洲曰韩产成在线| 欧美一区二视频| 国产aⅴ综合色| 亚洲靠逼com| 欧美一区二区日韩一区二区| 国产又黄又大久久| 国产精品盗摄一区二区三区| 91福利视频在线| 麻豆精品一区二区综合av| 国产喂奶挤奶一区二区三区| 99久久夜色精品国产网站| 一区二区三区蜜桃| 欧美白人最猛性xxxxx69交| 国产成人精品免费网站| 亚洲黄色av一区| 欧美xxxxx裸体时装秀| 岛国一区二区三区| 石原莉奈在线亚洲二区| 国产亚洲1区2区3区| 欧美日韩黄色一区二区| 国产成人免费视频网站高清观看视频| 亚洲欧洲日产国产综合网| 欧美一区二区三区婷婷月色| 成人综合日日夜夜| 美腿丝袜亚洲综合| 亚洲女与黑人做爰| 国产午夜亚洲精品午夜鲁丝片| 色噜噜狠狠色综合中国| 国产中文字幕一区| 天天影视色香欲综合网老头| 国产精品网站在线观看| 日韩欧美一卡二卡| 欧美亚洲免费在线一区| 岛国精品在线观看| 久久国产麻豆精品| 午夜欧美视频在线观看| 亚洲视频网在线直播| 久久综合九色综合欧美98| 在线视频国内自拍亚洲视频| 国产成人自拍高清视频在线免费播放| 亚洲一区电影777| 中文字幕一区二区三区四区不卡 | 91小视频在线| 国产精品小仙女| 日本女人一区二区三区| 亚洲美女淫视频| 国产精品久久看| 精品国产电影一区二区| 欧美精品国产精品| 在线中文字幕一区二区| 成人激情午夜影院| 国产精品 欧美精品| 青草av.久久免费一区| 亚洲一区二区三区小说| 国产精品久久久久久久久果冻传媒 | 一本久久综合亚洲鲁鲁五月天| 久久精品国产亚洲高清剧情介绍 | 亚洲成av人片在线观看无码| 中文字幕亚洲在| 亚洲国产成人自拍| 久久久久久夜精品精品免费| 精品国偷自产国产一区| 欧美电影精品一区二区| 欧美一区二区三区婷婷月色| 91精品在线免费| 91精品国产91久久久久久最新毛片| 欧美日韩中字一区| 欧美无乱码久久久免费午夜一区| 日本电影亚洲天堂一区| 色噜噜偷拍精品综合在线| 91美女片黄在线| 欧美三区免费完整视频在线观看| 91黄色免费观看| 欧美视频三区在线播放| 欧美日韩中字一区| 91精品国产综合久久香蕉麻豆| 777久久久精品| 欧美成人伊人久久综合网| 日韩久久精品一区| 久久精品亚洲国产奇米99| 久久久久久久久久久久电影| 国产欧美日本一区二区三区| 国产精品动漫网站| 亚洲成av人影院在线观看网| 奇米综合一区二区三区精品视频| 美女视频网站久久| 国产成人在线观看| 91女神在线视频| 欧美日韩日日夜夜| 亚洲精品一区二区三区香蕉| 久久久噜噜噜久噜久久综合| 国产精品乱子久久久久| 亚洲综合视频在线| 免费高清在线视频一区·| 国产精一品亚洲二区在线视频| hitomi一区二区三区精品| 在线不卡中文字幕| 日韩免费成人网| 亚洲欧洲日本在线| 日韩不卡手机在线v区| 国产美女精品一区二区三区| 成人高清免费观看| 欧美日韩一本到| 久久综合九色综合欧美98| 亚洲欧洲国产日本综合| 美女视频免费一区| 色婷婷精品久久二区二区蜜臀av| 69成人精品免费视频| 中文av一区二区| 日韩激情一区二区| 成年人国产精品| 88在线观看91蜜桃国自产| 国产欧美va欧美不卡在线| 亚洲小少妇裸体bbw| 国产不卡在线一区| 欧美日韩高清一区| 国产精品天干天干在观线| 天天影视网天天综合色在线播放| 粉嫩av一区二区三区| 5566中文字幕一区二区电影| 国产精品三级在线观看| 免费观看91视频大全| 在线看国产一区二区| 国产人成亚洲第一网站在线播放| 亚洲成人免费在线| 91免费观看视频在线| 欧美精品一区二区三| 日韩精品电影一区亚洲| 91在线一区二区三区| 国产亚洲欧美激情| 九九国产精品视频| 69av一区二区三区| 亚洲精品欧美在线| 成人av一区二区三区| 精品美女被调教视频大全网站| 亚洲高清视频中文字幕| 97se狠狠狠综合亚洲狠狠| 久久久久免费观看| 狠狠v欧美v日韩v亚洲ⅴ| 91精品婷婷国产综合久久竹菊| 亚洲三级在线免费观看| 成人做爰69片免费看网站| 精品免费99久久| 久色婷婷小香蕉久久| 欧美电影一区二区| 亚洲成人激情自拍| 欧美三区免费完整视频在线观看| 亚洲免费大片在线观看| 91啪在线观看| 亚洲美女视频在线观看| 99国产精品久| 中文字幕一区在线观看视频| caoporen国产精品视频| 久久久亚洲综合| 国产精品一区在线观看你懂的| 欧美大胆人体bbbb| 久久精品国产第一区二区三区| 日韩欧美一区在线| 久久99热狠狠色一区二区| 日韩精品一区二区三区老鸭窝| 亚洲va欧美va人人爽午夜| 欧美电影影音先锋| 美女网站一区二区| 2021国产精品久久精品| 国产成人在线观看免费网站| 国产欧美精品一区二区色综合| 北条麻妃一区二区三区| 亚洲人成小说网站色在线 | 久久电影网站中文字幕| 精品美女在线播放| 欧美日本一区二区三区四区| 亚洲猫色日本管| 91国偷自产一区二区开放时间| 亚洲欧美日韩成人高清在线一区| 色呦呦网站一区| 亚洲国产一区视频| 日韩视频一区二区在线观看| 久久99精品国产麻豆婷婷洗澡| 精品999在线播放| 国产 欧美在线| 一区二区三区欧美日韩| 制服视频三区第一页精品| 国产揄拍国内精品对白| 中文字幕一区二区三区四区不卡| 日韩国产高清在线| 国产激情91久久精品导航| 91久久久免费一区二区| 欧美高清hd18日本| 精品99999| 欧美一区午夜精品| 欧美一卡二卡三卡四卡| 色婷婷综合久久久久中文|