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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? qprilistlib.c

?? vxworks的完整的源代碼
?? C
字號(hào):
/* qPriListLib.c - priority ordered linked list queue library *//* Copyright 1984-1992 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01h,19jul92,pme  made qPriListRemove return STATUS.01g,26may92,rrr  the tree shuffle01f,19nov91,rrr  shut up some ansi warnings.01e,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed VOID to void		  -changed copyright notice01d,28sep90,jcf	 documentation.01c,05jul90,jcf  added qPriListCalibrate().01b,26jun90,jcf	 fixed qPriListResort();01a,14jun89,jcf	 written.*//*DESCRIPTIONThis library contains routines to manage a priority queue.  The queue ismaintained in priority order with simple priority insertion into a linked list.This queue performs a qPriListPut() operation preportional in time with numberof nodes in the queue.  This general purpose priority queue has many usesincluding the basis for priority semaphore queues.This queue complies with the multi-way queue data structures and thus may beutilized by any multi-way queue.  The priority list multi-way queueclass is accessed by the global id qPriListClassId.SEE ALSO: qLib.*/#include "vxWorks.h"#include "qClass.h"#include "qPriListLib.h"#include "stdlib.h"IMPORT ULONG vxTicks;		/* current time in ticks *//* locals */LOCAL Q_CLASS qPriListClass =    {    (FUNCPTR)qPriListCreate,    (FUNCPTR)qPriListInit,    (FUNCPTR)qPriListDelete,    (FUNCPTR)qPriListTerminate,    (FUNCPTR)qPriListPut,    (FUNCPTR)qPriListGet,    (FUNCPTR)qPriListRemove,    (FUNCPTR)qPriListResort,    (FUNCPTR)qPriListAdvance,    (FUNCPTR)qPriListGetExpired,    (FUNCPTR)qPriListKey,    (FUNCPTR)qPriListCalibrate,    (FUNCPTR)qPriListInfo,    (FUNCPTR)qPriListEach,    &qPriListClass    };LOCAL Q_CLASS qPriListFromTailClass =    {    (FUNCPTR)qPriListCreate,    (FUNCPTR)qPriListInit,    (FUNCPTR)qPriListDelete,    (FUNCPTR)qPriListTerminate,    (FUNCPTR)qPriListPutFromTail,    (FUNCPTR)qPriListGet,    (FUNCPTR)qPriListRemove,    (FUNCPTR)qPriListResort,    (FUNCPTR)qPriListAdvance,    (FUNCPTR)qPriListGetExpired,    (FUNCPTR)qPriListKey,    (FUNCPTR)qPriListCalibrate,    (FUNCPTR)qPriListInfo,    (FUNCPTR)qPriListEach,    &qPriListFromTailClass    };/* globals */Q_CLASS_ID qPriListClassId	   = &qPriListClass;Q_CLASS_ID qPriListFromTailClassId = &qPriListFromTailClass;/******************************************************************************** qPriListCreate - allocate and initialize a priority list queue** This routine allocates and initializes a priority list queue by allocating a* Q_PRI_HEAD structure from the free memory pool.** RETURNS:*  Pointer to a Q_PRI_HEAD, or*  NULL if out of memory.*/Q_PRI_HEAD *qPriListCreate (void)    {    Q_PRI_HEAD *pQPriHead = (Q_PRI_HEAD *) malloc (sizeof (Q_PRI_HEAD));    if (pQPriHead == NULL)	return (NULL);    qPriListInit (pQPriHead);    return (pQPriHead);    }/******************************************************************************** qPriListInit - initialize a priority list queue** This routine initializes the specified priority list queue.*/STATUS qPriListInit    (    Q_PRI_HEAD *pQPriHead    )    {    dllInit (pQPriHead);	 /* initialize doubly linked list */    return (OK);    }/******************************************************************************** qPriListDelete - delete a priority list queue** This routine deallocates memory associated with the queue.  All queued* nodes are lost.** RETURNS:*  OK, or*  ERROR if memory cannot be deallocated.*/STATUS qPriListDelete    (    Q_PRI_HEAD *pQPriHead    )    {    free ((char *) pQPriHead);    return OK;    }/******************************************************************************** qPriListTerminate - terminate a priority list queue** This routine terminates a priority list queue.  All queued nodes will be lost.** ARGSUSED*/STATUS qPriListTerminate    (    Q_PRI_HEAD *pQPriHead    )    {    return (OK);    }/********************************************************************************* qPriListPut - insert a node into a priority list queue** This routine inserts a node into a priority list queue.  The insertion is* based on the specified prioriyt key.  The lower the key the higher the* priority.*/void qPriListPut    (    Q_PRI_HEAD  *pQPriHead,    Q_PRI_NODE  *pQPriNode,    ULONG        key    )    {    FAST Q_PRI_NODE *pQNode = (Q_PRI_NODE *) DLL_FIRST (pQPriHead);    pQPriNode->key = key;    while (pQNode != NULL)        {	if (key < pQNode->key)		/* it will be last of same priority */	    {	    dllInsert (pQPriHead, DLL_PREVIOUS (&pQNode->node),		       &pQPriNode->node);	    return;	    }	pQNode = (Q_PRI_NODE *) DLL_NEXT (&pQNode->node);	}    dllInsert (pQPriHead, (DL_NODE *) DLL_LAST (pQPriHead), &pQPriNode->node);    }/********************************************************************************* qPriListPutFromTail - insert a node into a priority list queue from tail** This routine inserts a node into a priority list queue.  The insertion is* based on the specified prioriyt key.  The lower the key the higher the* priority.  Unlike qPriListPut(2), this routine searches for the correct* position in the queue from the queue's tail.  This is useful if the* caller has a priori knowledge that the key is of low priority.*/void qPriListPutFromTail    (    Q_PRI_HEAD  *pQPriHead,    Q_PRI_NODE  *pQPriNode,    ULONG        key    )    {    FAST Q_PRI_NODE *pQNode = (Q_PRI_NODE *) DLL_LAST (pQPriHead);    pQPriNode->key = key;    while (pQNode != NULL)        {	if (key >= pQNode->key)		/* it will be last of same priority */	    {	    dllInsert (pQPriHead, &pQNode->node, &pQPriNode->node);	    return;	    }	pQNode = (Q_PRI_NODE *) DLL_PREVIOUS (&pQNode->node);	}    dllInsert (pQPriHead, (DL_NODE *)NULL, &pQPriNode->node);    }/********************************************************************************* qPriListGet - remove and return first node in priority list queue** This routine removes and returns the first node in a priority list queue.  If* the queue is empty, NULL is returned.** RETURNS*  Pointer to first queue node in queue head, or*  NULL if queue is empty.*/Q_PRI_NODE *qPriListGet    (    Q_PRI_HEAD *pQPriHead    )    {    if (DLL_EMPTY (pQPriHead))	return (NULL);    return ((Q_PRI_NODE *) dllGet (pQPriHead));    }/********************************************************************************* qPriListRemove - remove a node from a priority list queue** This routine removes a node from the specified priority list queue.*/STATUS qPriListRemove    (    Q_PRI_HEAD *pQPriHead,    Q_PRI_NODE *pQPriNode    )    {    dllRemove (pQPriHead, &pQPriNode->node);    return (OK);    }/********************************************************************************* qPriListResort - resort a node to a new position based on a new key** This routine resorts a node to a new position based on a new key.*/void qPriListResort    (    FAST Q_PRI_HEAD *pQPriHead,    FAST Q_PRI_NODE *pQPriNode,    FAST ULONG       newKey    )    {    FAST Q_PRI_NODE *pPrev = (Q_PRI_NODE *)DLL_PREVIOUS (&pQPriNode->node);    FAST Q_PRI_NODE *pNext = (Q_PRI_NODE *)DLL_NEXT (&pQPriNode->node);    if (((pPrev == NULL) || (newKey >= pPrev->key)) &&	((pNext == NULL) || (newKey <= pNext->key)))	{	pQPriNode->key = newKey;	}    else	{	qPriListRemove (pQPriHead, pQPriNode);	qPriListPut (pQPriHead, pQPriNode, newKey);	}    }/********************************************************************************* qPriListAdvance - advance a queues concept of time** Priority list queues need not keep track of time because nodes contain time of* expiration.  So this routine is a NOP.** NOMANUAL* ARGSUSED*/void qPriListAdvance    (    Q_PRI_HEAD *pQPriHead    )    {    /* Absolute queue so advancing key of lead node unnecessary */    }/********************************************************************************* qPriListGetExpired - return a time-to-fire expired node** This routine returns a time-to-fire expired node in a priority list timer* queue.  Expired nodes result from a comparison with the global variable* vxTicks.  As many nodes may expire on a single advance of vxTicks, this* routine should be called inside a while loop until NULL is returned.  NULL* is returned when there are no expired nodes.** RETURNS*  Pointer to first queue node in queue head, or*  NULL if queue is empty.*/Q_PRI_NODE *qPriListGetExpired    (    Q_PRI_HEAD *pQPriHead    )    {    FAST Q_PRI_NODE *pQPriNode = (Q_PRI_NODE *) DLL_FIRST (pQPriHead);    if ((pQPriNode != NULL) && (pQPriNode->key <= vxTicks))	return ((Q_PRI_NODE *) dllGet (pQPriHead));    else	return (NULL);    }/********************************************************************************* qPriListCalibrate - offset every node in a queue by some delta** This routine offsets every node in a priority list queue by some delta.  The* offset may either by positive or negative.*/void qPriListCalibrate    (    Q_PRI_HEAD *pQHead,         /* queue head of queue to calibrate nodes for */    ULONG       keyDelta        /* offset to add to each node's key */    )    {    FAST Q_PRI_NODE *pQPriNode;    for (pQPriNode = (Q_PRI_NODE *) DLL_FIRST (pQHead);         pQPriNode != NULL;	 pQPriNode = (Q_PRI_NODE *) DLL_NEXT (&pQPriNode->node))	{        pQPriNode->key += keyDelta;			/* offset key */	}    }/********************************************************************************* qPriListKey - return the key of a node** This routine returns the key of a node currently in a priority list queue.** RETURNS*  Node's key.*/ULONG qPriListKey    (    Q_PRI_NODE *pQPriNode,    int         keyType                 /* 0 = normal; 1 = time queue */    )    {    if (keyType == 0)	return (pQPriNode->key);    else	return (pQPriNode->key - vxTicks);    }/********************************************************************************* qPriListInfo - gather information on a priority list queue** This routine fills up to maxNodes elements of a nodeArray with nodes* currently in a priority list queue.  The actual number of nodes copied to the* array is returned.  If the nodeArray is NULL, then the number of nodes in* the priority list queue is returned.** RETURNS*  Number of node pointers copied into the nodeArray, or*  Number of nodes in priority list queue if nodeArray is NULL*/int qPriListInfo    (    Q_PRI_HEAD *pQPriHead,      /* priority queue to gather list for */    FAST int nodeArray[],       /* array of node pointers to be filled in */    FAST int maxNodes           /* max node pointers nodeArray can accomodate */    )    {    FAST Q_PRI_NODE *pQNode = (Q_PRI_NODE *) DLL_FIRST (pQPriHead);    FAST int *pElement  = nodeArray;    if (nodeArray == NULL)		/* NULL node array means return count */	return (dllCount (pQPriHead));    while ((pQNode != NULL) && (--maxNodes >= 0))	{	*(pElement++) = (int)pQNode;			/* fill in table */	pQNode = (Q_PRI_NODE *) DLL_NEXT (&pQNode->node);	/* next node */	}    return (pElement - nodeArray);	/* return count of active tasks */    }/********************************************************************************* qPriListEach - call a routine for each node in a queue** This routine calls a user-supplied routine once for each node in the* queue.  The routine should be declared as follows:* .CS*  BOOL routine (pQNode, arg)*      Q_PRI_NODE *pQNode;	/@ pointer to a queue node          @/*      int	  arg;		/@ arbitrary user-supplied argument @/* .CE* The user-supplied routine should return TRUE if qPriListEach (2) is to* continue calling it for each entry, or FALSE if it is done and* qPriListEach can exit.** RETURNS: NULL if traversed whole queue, or pointer to Q_PRI_NODE that*          qPriListEach stopped on.*/Q_PRI_NODE *qPriListEach    (    Q_PRI_HEAD  *pQHead,        /* queue head of queue to call routine for */    FUNCPTR     routine,        /* the routine to call for each table entry */    int         routineArg      /* arbitrary user-supplied argument */    )    {    FAST Q_PRI_NODE *pQNode = (Q_PRI_NODE *) DLL_FIRST (pQHead);    while ((pQNode != NULL) && ((* routine) (pQNode, routineArg)))	pQNode = (Q_PRI_NODE *) DLL_NEXT (&pQNode->node);    return (pQNode);			/* return node we ended with */    }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品伦理一区二区| 欧美精品在欧美一区二区少妇| 欧美精品一区二区三区久久久| 日韩电影在线免费看| 欧美电视剧免费全集观看| 日本不卡视频一二三区| 2020国产精品久久精品美国| 国产高清在线精品| 亚洲日本青草视频在线怡红院 | 精品国产露脸精彩对白| 国产专区综合网| 1000部国产精品成人观看| 欧美性videosxxxxx| 奇米色一区二区| 欧美激情一区二区三区全黄| 色综合久久久网| 日韩成人午夜电影| 国产日韩欧美激情| 欧洲另类一二三四区| 久久精品久久99精品久久| 久久久久成人黄色影片| 色哟哟国产精品免费观看| 午夜视频在线观看一区| 久久亚洲春色中文字幕久久久| av午夜一区麻豆| 日韩和欧美的一区| 国产亚洲福利社区一区| 欧美系列亚洲系列| 国产经典欧美精品| 亚洲成人免费av| 国产亚洲精品bt天堂精选| 在线欧美日韩精品| 国产另类ts人妖一区二区| 亚洲精品视频观看| 欧美精品一区二区三区蜜桃 | 亚洲 欧美综合在线网络| 精品剧情v国产在线观看在线| www.av亚洲| 国产中文一区二区三区| 性做久久久久久久免费看| 欧美国产在线观看| 这里只有精品电影| aaa亚洲精品| 国产精品18久久久久久久久久久久 | 蜜臀av一区二区在线观看| 国产精品视频看| 日韩欧美国产高清| 91国在线观看| 成人在线视频一区| 精久久久久久久久久久| 亚洲一区二区在线播放相泽| 久久精品人人做人人爽人人| 91精品国产色综合久久ai换脸 | 中文字幕五月欧美| 欧美精品一区二区高清在线观看| 91麻豆.com| 国产精品123区| 麻豆专区一区二区三区四区五区| 亚洲激情图片小说视频| 国产精品久久久久久久久久免费看| 国产精品―色哟哟| 精品亚洲成av人在线观看| 精品视频一区三区九区| 免费成人在线视频观看| 99久久99久久精品免费观看| 国产精品99久久久久久宅男| 亚洲国产精品一区二区www在线| 中文字幕免费一区| 欧美精品一区二区在线播放| 日韩精品中文字幕一区二区三区 | 亚洲一区二区三区四区的| 国产精品三级视频| 国产清纯在线一区二区www| 精品成人一区二区三区四区| 欧美一二区视频| 国产精品免费久久久久| 欧美本精品男人aⅴ天堂| 91精品国产色综合久久ai换脸| 欧美专区在线观看一区| 在线观看91精品国产入口| 91福利社在线观看| 欧美日免费三级在线| 欧美私人免费视频| 欧美久久久久免费| 日韩欧美国产wwwww| 欧美mv日韩mv亚洲| 26uuu国产一区二区三区| 久久九九久精品国产免费直播| 2020日本不卡一区二区视频| 欧美国产精品一区| 亚洲美女精品一区| 性欧美大战久久久久久久久| 日本美女视频一区二区| 91精品1区2区| 国产suv一区二区三区88区| 亚洲欧美一区二区三区极速播放| 日韩伦理电影网| 一区二区三区四区五区视频在线观看| 亚洲免费大片在线观看| 亚洲一区精品在线| 免费在线观看一区二区三区| 国产在线精品免费| 国产成人精品一区二区三区网站观看| 成人理论电影网| 色婷婷一区二区| 欧美伦理电影网| 欧美变态口味重另类| 国产精品入口麻豆原神| 一区二区三区 在线观看视频| 亚洲不卡av一区二区三区| 日本aⅴ亚洲精品中文乱码| 国产真实乱对白精彩久久| a4yy欧美一区二区三区| 欧美久久久一区| 国产欧美一区二区精品性色| 亚洲视频一区二区免费在线观看| 香蕉加勒比综合久久| 国产在线精品免费| 欧美亚洲一区二区三区四区| 精品国产一区二区三区忘忧草 | 国产凹凸在线观看一区二区| 在线中文字幕不卡| 欧美mv日韩mv| 亚洲精品高清在线| 久久精品99国产国产精| 99久久国产综合精品色伊| 欧美一区2区视频在线观看| 国产丝袜欧美中文另类| 香蕉影视欧美成人| 岛国一区二区三区| 日韩美女啊v在线免费观看| 午夜亚洲国产au精品一区二区| 国产成人夜色高潮福利影视| 91成人在线免费观看| 久久亚区不卡日本| 午夜精品123| bt7086福利一区国产| 日韩欧美在线不卡| 亚洲最大的成人av| 丁香网亚洲国际| 精品国产凹凸成av人网站| 亚洲一区二区三区四区在线| 国产91精品一区二区麻豆网站| 欧美喷水一区二区| 亚洲欧美一区二区三区极速播放| 国产精品综合在线视频| 欧美二区乱c少妇| 亚洲欧美视频在线观看| 国产成人免费在线视频| 91精品国产福利| 亚洲午夜一二三区视频| 91在线观看成人| 国产精品视频线看| 国产精品18久久久| 久久久久久久电影| 免费观看在线色综合| 777午夜精品免费视频| 亚洲麻豆国产自偷在线| 99久久精品费精品国产一区二区| 国产欧美一区二区三区在线老狼| 九九视频精品免费| 欧美一区2区视频在线观看| 午夜精品久久久久影视| 欧美日韩免费视频| 亚洲午夜电影在线| 欧美日韩一区二区三区四区五区 | 国产盗摄一区二区三区| www日韩大片| 国产精品综合在线视频| 亚洲成a人v欧美综合天堂| 91官网在线免费观看| 亚洲欧美日韩一区二区 | 欧美日韩国产精品自在自线| 一区二区三区中文字幕精品精品 | 激情五月婷婷综合| 欧美成人女星排行榜| 经典一区二区三区| 久久久久久影视| 国产成人啪免费观看软件| 中文一区一区三区高中清不卡| 国产精品77777竹菊影视小说| 国产欧美综合在线| 成人激情动漫在线观看| 亚洲欧美在线观看| 色婷婷亚洲精品| 天天色综合成人网| 精品区一区二区| 国产69精品久久久久毛片| 国产精品久久毛片a| 99久久久免费精品国产一区二区| 亚洲日本免费电影| 欧美精品九九99久久| 精品一区二区三区免费播放| 久久精品男人天堂av| 不卡的av电影在线观看| 亚洲卡通欧美制服中文| 欧美日韩精品一区二区天天拍小说| 视频一区二区国产| 国产亚洲婷婷免费| 色老汉av一区二区三区|