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

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

?? qpriheaplib.c

?? vxworks5.5.1源代碼。完整源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区和二区| 偷拍日韩校园综合在线| 色av成人天堂桃色av| 一区二区三区四区在线| 欧美日韩亚洲综合在线| 日本三级亚洲精品| 久久久美女毛片| 99久久夜色精品国产网站| 一区二区三区在线视频播放| 欧美高清激情brazzers| 国产美女av一区二区三区| 国产精品第一页第二页第三页| 色www精品视频在线观看| 日韩经典中文字幕一区| 国产日韩精品一区二区三区| 91丨porny丨首页| 日本一区中文字幕| 国产日本欧洲亚洲| 欧洲精品一区二区三区在线观看| 日韩电影免费在线观看网站| 国产欧美一区二区三区在线老狼| 99久久免费精品| 日韩高清一区在线| 国产欧美日韩在线看| 色94色欧美sute亚洲13| 老鸭窝一区二区久久精品| 中文一区在线播放| 欧美精品在线一区二区| 国产成人免费在线观看不卡| 亚洲午夜精品久久久久久久久| 日韩欧美电影一二三| 93久久精品日日躁夜夜躁欧美| 日本一不卡视频| 亚洲欧洲日本在线| 欧美一级电影网站| 91污片在线观看| 欧美日韩国产乱码电影| 国产精品自拍在线| 亚洲超丰满肉感bbw| 国产人久久人人人人爽| 欧美裸体bbwbbwbbw| 国产成人精品一区二| 亚洲成人免费视| 国产精品欧美极品| 欧美一二三区精品| 色狠狠色噜噜噜综合网| 国产高清不卡一区二区| 午夜精品久久久久久久99樱桃| 久久久久99精品一区| 欧美日韩亚洲综合| jizzjizzjizz欧美| 久久精品国产99国产| 一区二区成人在线观看| 国产欧美一区二区三区沐欲| 91精品国产欧美日韩| 99久久婷婷国产精品综合| 久草中文综合在线| 亚洲国产一区二区a毛片| 国产精品视频yy9299一区| 日韩一级片网址| 欧美视频一区二区三区| 成人动漫中文字幕| 韩国视频一区二区| 日韩精品欧美精品| 一区二区三区四区乱视频| 中文字幕av资源一区| 日韩你懂的在线播放| 欧美日韩国产首页| 日本久久一区二区三区| 成人手机电影网| 国产乱码精品1区2区3区| 日本免费在线视频不卡一不卡二| 亚洲一区国产视频| 亚洲欧洲成人精品av97| 国产亚洲成年网址在线观看| 欧美成人在线直播| 欧美一区日韩一区| 欧美日韩国产精品自在自线| 色又黄又爽网站www久久| 福利91精品一区二区三区| 久久99精品久久久久婷婷| 日本欧美久久久久免费播放网| 亚洲小说欧美激情另类| 亚洲精品高清在线观看| 国产精品超碰97尤物18| 中文字幕成人av| 久久精品视频在线免费观看| 亚洲精品在线网站| 欧美一二三区在线| 欧美一区二区三区免费| 欧美一区2区视频在线观看| 欧美日韩一区二区三区四区五区 | 色综合天天性综合| 东方aⅴ免费观看久久av| 国产盗摄一区二区三区| 国产精一区二区三区| 狠狠色丁香婷婷综合久久片| 日韩和欧美一区二区| 午夜精品久久久久久久久| 成人短视频下载| 成人免费毛片app| www.亚洲激情.com| 97久久久精品综合88久久| 北条麻妃国产九九精品视频| 成人免费观看视频| av成人动漫在线观看| 91在线观看免费视频| 99精品久久只有精品| 色婷婷亚洲精品| 欧美色精品在线视频| 欧美日韩国产高清一区二区| 欧美日韩一级二级三级| 91精品国产综合久久精品麻豆| 91精品国产全国免费观看| 日韩一区二区中文字幕| 精品日韩在线观看| 久久精品一区二区三区av| 亚洲国产高清在线观看视频| 中文字幕色av一区二区三区| 自拍偷拍欧美精品| 亚洲成人免费观看| 免费成人你懂的| 精品亚洲aⅴ乱码一区二区三区| 国产乱码字幕精品高清av | 一二三四社区欧美黄| 午夜久久久久久久久| 久久国产日韩欧美精品| 国产麻豆精品一区二区| a在线播放不卡| 欧美亚洲一区三区| 欧美一区二区三区免费| 国产亚洲一区字幕| 亚洲蜜桃精久久久久久久| 视频在线观看国产精品| 激情都市一区二区| 93久久精品日日躁夜夜躁欧美| 欧美性xxxxx极品少妇| 日韩一区二区三区免费观看| 国产亚洲成年网址在线观看| 亚洲精品一二三| 奇米在线7777在线精品| 东方aⅴ免费观看久久av| 在线观看日韩高清av| 日韩欧美一二区| 国产精品网曝门| 亚洲v日本v欧美v久久精品| 久久精品国产一区二区三区免费看| 国产高清亚洲一区| 欧美中文字幕一二三区视频| 日韩免费看的电影| 日韩毛片一二三区| 蜜臀va亚洲va欧美va天堂| 国产91丝袜在线播放九色| 欧美在线综合视频| 久久久久久一二三区| 亚洲综合久久av| 精品一区二区av| 91丝袜美腿高跟国产极品老师 | 欧美综合色免费| 精品久久久久久久人人人人传媒| 国产精品久久久久久久午夜片 | 日韩欧美成人一区| 综合亚洲深深色噜噜狠狠网站| 秋霞国产午夜精品免费视频| 成人av影院在线| 91麻豆精品91久久久久久清纯| 国产女同互慰高潮91漫画| 亚洲gay无套男同| 成人高清免费在线播放| 欧美精品 国产精品| 国产精品狼人久久影院观看方式| 午夜欧美一区二区三区在线播放| 东方欧美亚洲色图在线| 日韩视频一区二区三区| 亚洲美女视频在线观看| 国产精品一区二区久激情瑜伽| 国产精品美日韩| 蜜桃精品视频在线| 在线免费不卡视频| 国产欧美日产一区| 人人超碰91尤物精品国产| 91麻豆国产精品久久| 久久久精品日韩欧美| 午夜精品免费在线| 91免费看片在线观看| 久久蜜桃av一区精品变态类天堂 | 亚洲第一av色| 国产99久久久精品| 欧美人与z0zoxxxx视频| ...av二区三区久久精品| 一区二区免费视频| 国产成人免费视频精品含羞草妖精 | 欧美猛男gaygay网站| 国产精品理伦片| 国产乱子伦视频一区二区三区| 欧美丰满一区二区免费视频| |精品福利一区二区三区| 国产成人精品一区二区三区四区| 91精品国产综合久久久久久久久久 | 18涩涩午夜精品.www|