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

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

?? qpriheaplib.c

?? VxWorks BSP框架源代碼包含頭文件和驅動
?? 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一区二区三区免费野_久草精品视频
亚洲美女一区二区三区| 欧美一区二区大片| 国产毛片一区二区| 成人午夜看片网址| 欧美日本乱大交xxxxx| 色天使久久综合网天天| 欧美日本韩国一区| 精品久久人人做人人爽| 成人黄色在线看| 成人av网站在线观看| 国产iv一区二区三区| 偷拍一区二区三区四区| 国产精品免费久久| 色婷婷综合久色| 成人久久视频在线观看| 色综合天天综合在线视频| 91精品综合久久久久久| 国产精品成人免费| 极品少妇xxxx偷拍精品少妇| 91视频免费播放| 国产亚洲欧美一级| 美女视频网站黄色亚洲| 91麻豆精品一区二区三区| 国产精品久久一卡二卡| 麻豆一区二区在线| 欧美亚洲综合色| 亚洲精品日韩专区silk| 国产精品资源站在线| 91精品啪在线观看国产60岁| 亚洲伦在线观看| 免费成人你懂的| av电影在线观看完整版一区二区| 成人av影院在线| 欧美日韩精品一区二区| 亚洲精品水蜜桃| 日韩精品一区二区三区蜜臀| 男人的天堂久久精品| 高清shemale亚洲人妖| 欧美一区二区视频观看视频| 亚洲欧美自拍偷拍| 一区二区三区中文字幕精品精品| 国产91精品一区二区麻豆网站| 国产视频在线观看一区二区三区| 国产一区二区导航在线播放| 精品国内片67194| 成人精品小蝌蚪| 国产一区美女在线| 亚洲欧美另类图片小说| 99视频在线观看一区三区| 亚洲一区二区欧美激情| 精品91自产拍在线观看一区| 成人app网站| 日韩电影在线一区| 国产精品久久久久aaaa樱花| 欧美日韩二区三区| 成人午夜av在线| 日日欢夜夜爽一区| 亚洲男同性视频| 欧美成人一区二区三区片免费 | 欧美另类videos死尸| 久久99精品久久久久久| 亚洲精品国产精华液| 国产日韩欧美一区二区三区乱码| 欧美综合天天夜夜久久| 国产剧情一区在线| 日韩成人dvd| 亚洲bt欧美bt精品777| 国产精品久久二区二区| 日韩精品一区二区三区视频 | 亚洲国产美女搞黄色| 中文字幕一区二区三中文字幕| 日韩精品一区二区三区swag| 欧美吞精做爰啪啪高潮| www.久久精品| 成人av网址在线观看| 成人爽a毛片一区二区免费| 激情综合色综合久久| 蜜臀av一级做a爰片久久| 亚洲一区二区三区在线| 一区二区三区av电影| 亚洲精品国产精品乱码不99 | www.亚洲色图| 91女人视频在线观看| 91网站最新网址| 欧美日韩国产在线播放网站| 欧美日韩高清一区二区不卡| 日韩一区二区三免费高清| 日韩欧美成人一区| 久久影院电视剧免费观看| 国产欧美日韩在线| 成人免费在线播放视频| 国产成人激情av| 欧美怡红院视频| 日韩一区二区中文字幕| 久久久99久久精品欧美| 欧美激情一二三区| 亚洲高清在线视频| 国产99久久久国产精品潘金网站| 97久久超碰国产精品电影| 欧美三级电影在线看| 国产日产欧美精品一区二区三区| 亚洲欧美区自拍先锋| 国产一区二区看久久| 欧美色视频一区| 中文字幕乱码一区二区免费| 丝袜国产日韩另类美女| 成人免费看片app下载| 中文字幕欧美三区| 久久精工是国产品牌吗| 欧美视频在线观看一区二区| 中文字幕在线一区| 高清久久久久久| 亚洲精品一区在线观看| 日韩精品一级二级| 欧美色综合网站| 亚洲青青青在线视频| 丰满白嫩尤物一区二区| 欧美精品一区二区三区四区| 亚洲成人午夜电影| 欧美日韩国产成人在线免费| 亚洲色图一区二区三区| 国产成人精品免费| 国产精品久久久久三级| 成人av免费在线播放| 国产精品久久毛片av大全日韩| 懂色av中文字幕一区二区三区| 国产午夜精品福利| 97久久超碰国产精品| 一区二区三区四区亚洲| 欧美日韩在线精品一区二区三区激情| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国内精品写真在线观看| 中文av字幕一区| 99久久精品国产麻豆演员表| 玉米视频成人免费看| 欧美性生活大片视频| 人人精品人人爱| 国产日本欧美一区二区| 97久久精品人人做人人爽| 午夜影院久久久| 国产午夜精品福利| 欧洲一区二区三区在线| 久久99热这里只有精品| 国产精品素人一区二区| 69堂精品视频| 成人动漫在线一区| 蜜臀av性久久久久蜜臀aⅴ| 国产精品乱子久久久久| 日韩精品一区二区三区视频| 在线视频国产一区| 精一区二区三区| 亚洲激情网站免费观看| 久久精品欧美一区二区三区不卡 | av在线不卡电影| 国产裸体歌舞团一区二区| 天堂久久久久va久久久久| 日韩伦理免费电影| 国产视频一区二区在线| 日韩一区二区三区在线| 欧美日韩成人在线| 色悠久久久久综合欧美99| 国产成人精品一区二区三区网站观看| 视频一区二区三区入口| 亚洲午夜精品网| 亚洲黄色性网站| 一区二区三区四区视频精品免费 | 在线观看91精品国产入口| 不卡大黄网站免费看| 韩国毛片一区二区三区| 国产在线视频精品一区| 国产一区在线看| 国产另类ts人妖一区二区| 国产激情视频一区二区在线观看| 久久99精品久久久久久动态图 | 亚洲一区二区三区不卡国产欧美 | 色婷婷综合久久久中文字幕| 91在线高清观看| 欧美高清你懂得| 国产视频一区二区在线观看| 亚洲国产岛国毛片在线| 日韩伦理av电影| 视频一区二区国产| 国内精品写真在线观看| 91视频国产观看| 69堂精品视频| 中文字幕中文字幕一区二区| 亚洲成人在线观看视频| 成人精品一区二区三区中文字幕| 在线影院国内精品| 精品美女在线播放| 亚洲激情中文1区| 国产风韵犹存在线视精品| 日本福利一区二区| 久久久久97国产精华液好用吗| 一区二区国产视频| 成人伦理片在线| 国产日韩欧美不卡| 美女被吸乳得到大胸91| 精品裸体舞一区二区三区| 国产精品欧美一级免费|