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

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

?? qpriheaplib.c

?? VxWorks BSP框架源代碼包含頭文件和驅(qū)動(dòng)
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* qPriHeapLib.c - heap priority queue management library *//* Copyright 1984-1998 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01p,11nov01,dee  Add COLDFIRE support01o,04sep98,cdp  make ARM CPUs with ARM_THUMB==TRUE use portable routines.01n,22apr97,jpd  Added ARM to non-portable list.01m,19mar95,dvs  removed tron references.01l,19jul92,pme  made qPriHeapRemove return STATUS.01k,18jul92,smb  Changed errno.h to errnoLib.h.01j,26may92,rrr  the tree shuffle01i,19nov91,rrr  shut up some ansi warnings.01h,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice01g,23jul91,hdn  added conditional macro for optimized TRON codes.01f,24may91,wmd  added predeclarations to avoid compiler errors.01e,28sep90,jcf	 documentation.01d,05jul90,jcf	 added qPriHeapCalibrate().01c,26jun90,jcf	 add qPriHeapResort().01b,10may90,jcf	 fixed PORTABLE definition.01a,14jun89,jcf	 written.*//*DESCRIPTIONThis library contains routines to manage a priority queue.  The queue ismaintained in priority order in a binary tree.  This queue performs aqPriHeapPut() operation preportional in time with log base 2 of the number ofnodes in the queue.  This queue is used for timer queues.  The only restrictionis that the heap can only handle a static number of nodes as specified atcreation time.This queue complies with the multi-way queue data structures and thus may beutilized by any multi-way queue.  The priority heap multi-way queueclass is accessed by the global id qPriHeapClassId.SEE ALSO: qLib()*/#include "vxWorks.h"#include "qClass.h"#include "qPriHeapLib.h"#include "stdlib.h"#include "string.h"#include "errnoLib.h"#include "stdio.h"/* XXX should break out for each architecture *//* optimized version available for 680X0 and ARM */#if (defined(PORTABLE) || \     ((CPU_FAMILY != MC680X0) && (CPU_FAMILY != ARM) && (CPU_FAMILY != COLDFIRE)) || \     ((CPU_FAMILY == ARM) && ARM_THUMB))#define qPriHeapLib_PORTABLE#endif	/* (defined(PORTABLE) || (CPU_FAMILY != MC680X0)) *//* imports */IMPORT ULONG vxTicks;		/* current time in ticks *//* globals */LOCAL Q_CLASS qPriHeapClass =    {    (FUNCPTR)qPriHeapCreate,    (FUNCPTR)qPriHeapInit,    (FUNCPTR)qPriHeapDelete,    (FUNCPTR)qPriHeapTerminate,    (FUNCPTR)qPriHeapPut,    (FUNCPTR)qPriHeapGet,    (FUNCPTR)qPriHeapRemove,    (FUNCPTR)qPriHeapResort,    (FUNCPTR)qPriHeapAdvance,    (FUNCPTR)qPriHeapGetExpired,    (FUNCPTR)qPriHeapKey,    (FUNCPTR)qPriHeapCalibrate,    (FUNCPTR)qPriHeapInfo,    (FUNCPTR)qPriHeapEach,    &qPriHeapClass    };Q_CLASS_ID qPriHeapClassId = &qPriHeapClass;/* forward static functions */#ifdef qPriHeapLib_PORTABLEstatic void qPriHeapUp (Q_PRI_HEAP_HEAD *pQPriHeapHead, int index);static void qPriHeapDown (Q_PRI_HEAP_HEAD *pQPriHeapHead, int index);#elseextern void qPriHeapUp (Q_PRI_HEAP_HEAD *pQPriHeapHead, int index);extern void qPriHeapDown (Q_PRI_HEAP_HEAD *pQPriHeapHead, int index);#endif/******************************************************************************** qPriHeapArrayCreate - create and initialized a heap priority queue** Create a heap priority queue.  Initialize the specified queue header.** RETURNS: OK or ERROR if not enough memory to create queue.** SEE ALSO: qPriHeapInit (2)*/HEAP_ARRAY *qPriHeapArrayCreate    (    int heapSize    )    {    return ((HEAP_ARRAY *) malloc ((unsigned) 4 * heapSize));    }/******************************************************************************** qPriHeapArrayDelete - deallocate a heap array** This routine returns an allocated HEAP_ARRAY structure to the free memory* pool.** RETURNS:*  OK, or*  ERROR if could not deallocate heap array.*/STATUS qPriHeapArrayDelete    (    HEAP_ARRAY *pHeapArray    )    {    free ((char *) pHeapArray);    return OK;    }/******************************************************************************** qPriHeapCreate - create and initialized a heap priority queue** Create a heap priority queue.  Initialize the specified queue header.** RETURNS: OK or ERROR if not enough memory to create queue.** SEE ALSO: qPriHeapInit (2)*/Q_PRI_HEAP_HEAD *qPriHeapCreate    (    HEAP_ARRAY *pHeapArray    )    {    Q_PRI_HEAP_HEAD *pQPriHeapHead = (Q_PRI_HEAP_HEAD *)				     malloc (sizeof (Q_PRI_HEAP_HEAD));    if (pQPriHeapHead == NULL)	return (NULL);    if (qPriHeapInit (pQPriHeapHead, pHeapArray) != OK)	{	free ((char *)pQPriHeapHead);	return (NULL);	}    return (pQPriHeapHead);    }/******************************************************************************** qPriHeapInit - initialize a heap priority queue** Initialize the heap priority queue pointed to by the specified queue* header.** RETURNS:  OK, or ERROR if heap priority queue could not be initialized.** ERRNO: S_qPriHeapLib_NULL_HEAP_ARRAY**/STATUS qPriHeapInit    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,    HEAP_ARRAY      *pHeapArray    )    {    if (pHeapArray == NULL)	{	errnoSet (S_qPriHeapLib_NULL_HEAP_ARRAY);	return (ERROR);	}    pQPriHeapHead->pHeapArray	= pHeapArray;	/* store bmap list pointer */    pQPriHeapHead->pHighNode	= NULL;		/* zero the highest node */    pQPriHeapHead->heapIndex	= 0;		/* initialize the heap index */    return (OK);    }/******************************************************************************** qPriHeapDelete - delete a priority heap queue** This routine deallocates memory associated with the queue.  All queued* nodes are lost.** RETURNS:*  OK, or*  ERROR if memory cannot be deallocated.*/STATUS qPriHeapDelete    (    Q_PRI_HEAP_HEAD *pQPriHeapHead    )    {    free ((char *) pQPriHeapHead);    return OK;    }/******************************************************************************** qPriHeapTerminate - terminate a heap priority queue** This routine terminates a heap priority queue.  All queued nodes will be lost.** ARGSUSED*/STATUS qPriHeapTerminate    (    Q_PRI_HEAP_HEAD *pQPriHeapHead    )    {    return (OK);    }/********************************************************************************* qPriHeapPut - insert a node into a heap priority queue** This routine inserts a node into a heap priority queue.  The insertion is* based on the priority key.  The lower the key the higher the priority.*/void qPriHeapPut    (    Q_PRI_HEAP_HEAD     *pQPriHeapHead,    Q_PRI_HEAP_NODE     *pQPriHeapNode,    ULONG                key    )    {    int index = pQPriHeapHead->heapIndex++;    pQPriHeapNode->key = key;    (*pQPriHeapHead->pHeapArray)[index] = pQPriHeapNode;    qPriHeapUp (pQPriHeapHead, index);    }/********************************************************************************* qPriHeapGet - remove and return first node in heap priority queue** This routine removes and returns the first node in a heap priority 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_HEAP_NODE *qPriHeapGet    (    Q_PRI_HEAP_HEAD *pQPriHeapHead    )    {    FAST Q_PRI_HEAP_NODE **heapArray = *pQPriHeapHead->pHeapArray;    Q_PRI_HEAP_NODE *pQPriHeapNode = pQPriHeapHead->pHighNode;    if (pQPriHeapHead->heapIndex == 0)	return (NULL);    else if (pQPriHeapHead->heapIndex-- == 1)	pQPriHeapHead->pHighNode = NULL;    else	{	heapArray [0] = heapArray [pQPriHeapHead->heapIndex];	qPriHeapDown (pQPriHeapHead, 0);	}    return (pQPriHeapNode);    }/********************************************************************************* qPriHeapRemove - remove a node from a heap priority queue** This routine removes a node from the specified heap priority queue.*/STATUS qPriHeapRemove    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,    Q_PRI_HEAP_NODE *pQPriHeapNode    )    {    FAST int index = pQPriHeapNode->index;    FAST Q_PRI_HEAP_NODE **heapArray = *pQPriHeapHead->pHeapArray;    int heapIndex = pQPriHeapHead->heapIndex;    if (--pQPriHeapHead->heapIndex == 0)	pQPriHeapHead->pHighNode = NULL;    else	{	heapArray [index] = heapArray [heapIndex - 1];	if ((index > 0) &&	    (heapArray [(index - 1) / 2]->key > heapArray [index]->key))	    qPriHeapUp (pQPriHeapHead, index);	else	    qPriHeapDown (pQPriHeapHead, index);	}    return (OK);    }/********************************************************************************* qPriHeapResort - resort a node to a new position based on a new key

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片在线| 欧美精品在线视频| 91极品视觉盛宴| 欧美老肥妇做.爰bbww| 日韩欧美成人一区| 中文一区二区完整视频在线观看| 日韩码欧中文字| 亚洲一区免费在线观看| 精彩视频一区二区| 久久狠狠亚洲综合| www.在线成人| 欧美一卡2卡三卡4卡5免费| 久久久久久97三级| 亚洲愉拍自拍另类高清精品| 精品一区二区三区免费播放| 99精品视频中文字幕| 欧美精品久久一区二区三区| 国产亚洲精品资源在线26u| 一区二区三区欧美激情| 精品亚洲成av人在线观看| 99九九99九九九视频精品| 91精品在线免费| 亚洲国产精品t66y| 午夜欧美电影在线观看| 国产suv一区二区三区88区| 国产精品麻豆视频| 日韩精品乱码免费| 99re亚洲国产精品| 日韩欧美在线不卡| 亚洲免费在线电影| 久久电影网站中文字幕 | 欧美一区二区播放| 亚洲欧洲日本在线| 韩国av一区二区三区| 欧美色综合久久| 中文字幕中文在线不卡住| 免费在线一区观看| 欧美在线短视频| 亚洲国产岛国毛片在线| 久久国产免费看| 91国在线观看| 国产日韩欧美精品一区| 视频在线观看国产精品| 97国产一区二区| 国产亚洲欧美日韩在线一区| 日产欧产美韩系列久久99| 色综合久久久久网| 国产三级欧美三级日产三级99| 午夜欧美在线一二页| 色婷婷av一区二区三区gif| 欧美极品少妇xxxxⅹ高跟鞋| 九色|91porny| 欧美一级日韩免费不卡| 亚洲国产精品久久一线不卡| 99久久精品情趣| 国产人妖乱国产精品人妖| 青娱乐精品在线视频| 欧美三级乱人伦电影| 日韩美女视频一区二区 | 国产精品久久精品日日| 国产精品一级片| 日韩精品专区在线影院重磅| 日日夜夜精品视频免费| 欧美日韩久久一区二区| 一区二区三区不卡在线观看| 99精品黄色片免费大全| 国产日本欧洲亚洲| 国产成人99久久亚洲综合精品| 精品国产一区久久| 经典三级在线一区| 精品999在线播放| 黑人精品欧美一区二区蜜桃| 日韩一区和二区| 美女一区二区三区在线观看| 在线不卡一区二区| 日韩电影在线一区二区| 51午夜精品国产| 三级欧美在线一区| 这里是久久伊人| 久久国产精品99久久人人澡| 精品乱人伦小说| 国产成人在线视频免费播放| 久久久五月婷婷| 从欧美一区二区三区| 中文字幕国产一区二区| 91麻豆视频网站| 亚洲资源在线观看| 91精品国产手机| 久久99精品久久久久| 欧美精品一区二区三区在线播放| 国产九九视频一区二区三区| 日本一区二区免费在线 | 亚洲成人免费av| 欧美精品日日鲁夜夜添| 美女网站色91| 久久九九99视频| 91亚洲国产成人精品一区二区三| 亚洲欧美日韩在线不卡| 欧美日韩国产a| 黄色日韩网站视频| 国产精品蜜臀av| 欧美无人高清视频在线观看| 视频一区国产视频| 久久久久久久综合狠狠综合| 成人黄色777网| 亚洲国产三级在线| 在线播放国产精品二区一二区四区 | 亚洲三级电影全部在线观看高清| 色噜噜狠狠色综合欧洲selulu | 欧美系列亚洲系列| 日韩激情一二三区| 精品嫩草影院久久| 成人一级黄色片| 一区二区三区在线播| 欧美日韩五月天| 国产精品资源在线| 一区二区三区国产精品| 欧美区一区二区三区| 久久精品国产免费看久久精品| 久久久久99精品国产片| caoporn国产一区二区| 国产精品视频观看| 欧美亚洲一区二区三区四区| 美女脱光内衣内裤视频久久网站| 久久精品视频在线看| 97久久精品人人做人人爽| 中文在线一区二区| 欧美一区二区播放| 成人精品在线视频观看| 一级中文字幕一区二区| 日韩欧美美女一区二区三区| 成人黄色小视频| 免费成人av在线| 中文字幕av一区二区三区免费看| 在线免费不卡电影| 精品一区二区三区蜜桃| 亚洲免费在线观看| 在线播放国产精品二区一二区四区| 国产精品一区二区x88av| 一区2区3区在线看| 欧美一区二区三区思思人| 精品一区二区免费| 亚洲日本在线视频观看| 欧美成人午夜电影| 色综合久久久久综合99| 国内精品免费**视频| 午夜电影网亚洲视频| 欧美国产一区视频在线观看| 欧美日本高清视频在线观看| 久久精品99久久久| 亚洲欧美日韩一区二区| 久久精品人人爽人人爽| 欧美日韩国产bt| 99久免费精品视频在线观看| 日韩精品电影在线| 亚洲午夜一二三区视频| 国产欧美中文在线| 欧美艳星brazzers| 国产成人高清视频| 秋霞午夜鲁丝一区二区老狼| 樱桃视频在线观看一区| 久久久国产精品午夜一区ai换脸| 91丨九色丨蝌蚪富婆spa| 国产成人精品免费视频网站| 日韩高清在线电影| 亚洲精品欧美专区| 国产日产欧美一区二区视频| 在线日韩一区二区| 99r精品视频| 国产福利一区二区| 久久99精品视频| 午夜免费久久看| 中文字幕在线不卡| 中文字幕日韩一区二区| 久久久av毛片精品| 欧美一区二区三区公司| 欧美三区在线视频| 在线欧美日韩国产| eeuss鲁片一区二区三区在线看| 国产精一品亚洲二区在线视频| 日韩—二三区免费观看av| 亚洲婷婷国产精品电影人久久| 国产精品久久久久久久久免费樱桃| 26uuu色噜噜精品一区| 日韩一卡二卡三卡国产欧美| 欧美日本免费一区二区三区| 在线观看网站黄不卡| 欧美日韩一区久久| 欧美影院一区二区三区| 欧美色综合久久| 欧美午夜精品久久久| 欧美视频第二页| 欧美亚日韩国产aⅴ精品中极品| 欧美亚洲国产一卡| 欧美午夜精品理论片a级按摩| 日本黄色一区二区| 91免费观看视频| 国产美女视频91| 国产成人av电影在线| 国产69精品久久777的优势|