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

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

?? qpriheaplib.c

?? 操作系統(tǒng)開發(fā),vxwork操作系統(tǒng)源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
** This routine resorts a node to a new position based on a new key.*/void qPriHeapResort    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,    Q_PRI_HEAP_NODE *pQPriHeapNode,    ULONG            newKey    )    {    FAST int index = pQPriHeapNode->index;    FAST Q_PRI_HEAP_NODE **heapArray = *pQPriHeapHead->pHeapArray;    pQPriHeapNode->key = newKey;    if ((index > 0) &&	(heapArray [(index - 1) / 2]->key > heapArray [index]->key))	qPriHeapUp (pQPriHeapHead, index);    else	qPriHeapDown (pQPriHeapHead, index);    }/********************************************************************************* qPriHeapAdvance - advance a queues concept of time** Heap queues need not keep track of time because nodes contain time of* expiration.  So this routine is a NOP.** NOMANUAL* ARGSUSED*/void qPriHeapAdvance    (    Q_PRI_HEAP_HEAD *pQPriHeapHead    )    {    /* Absolute queue so advancing key of lead node unnecessary */    }/********************************************************************************* qPriHeapGetExpired - return a time-to-fire expired node** This routine returns a time-to-fire expired node in a heap priority 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_HEAP_NODE *qPriHeapGetExpired    (    Q_PRI_HEAP_HEAD *pQPriHeapHead    )    {    Q_PRI_HEAP_NODE *pQPriHeapNode = pQPriHeapHead->pHighNode;    if ((pQPriHeapNode != NULL) && (pQPriHeapNode->key <= vxTicks))	return (qPriHeapGet (pQPriHeapHead));    else	return ((Q_PRI_HEAP_NODE *) NULL);    }/********************************************************************************* qPriHeapKey - return the key of a node** This routine returns the key of a node currently in a heap priority queue.* The keyType determines key style.  A normal key style returns the nodes* internal key.  A timer queue key type style returns the key as the* time-to-fire.** RETURNS*  Node's key, or*  node's time-to-fire.*/ULONG qPriHeapKey    (    Q_PRI_HEAP_NODE *pQPriHeapNode,    int              keyType            /* 0 = normal; 1 = time queue */    )    {    if (keyType == 0)	return (pQPriHeapNode->key);    else	return (pQPriHeapNode->key - vxTicks);    }/********************************************************************************* qPriHeapCalibrate - offset every node in a queue by some delta** This routine offsets every node in a heap priority queue by some delta.  The* offset may either by positive or negative.*/void qPriHeapCalibrate    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,     /* queue to calibrate nodes for */    ULONG            keyDelta           /* offset to add to each node's key */    )    {    FAST int ix;    FAST Q_PRI_HEAP_NODE **heapArray = *pQPriHeapHead->pHeapArray;    for (ix = 0; ix < pQPriHeapHead->heapIndex; ix ++)	 heapArray[ix]->key += keyDelta;    }/********************************************************************************* qPriHeapInfo - gather information on a priority heap queue** This routine fills up to maxNodes elements of a nodeArray with nodes* currently in a priority heap 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 heap queue is returned.** RETURNS*  Number of node pointers copied into the nodeArray, or*  Number of nodes in multi-way queue if nodeArray is NULL*/int qPriHeapInfo    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,     /* heap queue to gather list for */    FAST int nodeArray[],               /* array of node pointers for filling */    FAST int maxNodes                   /* max node pointers for nodeArray */    )    {    int numNodes = min (maxNodes, pQPriHeapHead->heapIndex);    if (nodeArray == NULL)		/* NULL node array means return count */	return (pQPriHeapHead->heapIndex);    bcopy ((char *)*pQPriHeapHead->pHeapArray, (char *)nodeArray, numNodes * 4);    return (numNodes);    }/********************************************************************************* qPriHeapEach - 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_HEAP_NODE	*pQNode;	/@ pointer to a queue node          @/*      int		arg;		/@ arbitrary user-supplied argument @/* .CE* The user-supplied routine should return TRUE if qPriHeapEach (2) is to* continue calling it for each entry, or FALSE if it is done and* qPriHeapEach can exit.** RETURNS: NULL if traversed whole queue, or pointer to Q_PRI_HEAP_NODE that*          qPriHeapEach stopped on.*/Q_PRI_HEAP_NODE *qPriHeapEach    (    Q_PRI_HEAP_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 int ix;    for (ix = 0;	 (ix < pQHead->heapIndex) &&	 ((* routine) ((*pQHead->pHeapArray)[ix], routineArg));	 ix ++)	;    if (ix < pQHead->heapIndex)	return ((*pQHead->pHeapArray)[ix]);	/* return node we ended with */    else	return ((Q_PRI_HEAP_NODE *) NULL);	/* did all nodes */    }#ifdef qPriHeapLib_PORTABLE/********************************************************************************* qPriHeapUp - elevate a node to its proper place in the heap tree** This routine elevates a node to its proper place in the heap tree.*/LOCAL void qPriHeapUp    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,    int index    )    {    int workIx   = index;    int parentIx = (workIx - 1) / 2;    Q_PRI_HEAP_NODE **heapArray = *pQPriHeapHead->pHeapArray;    Q_PRI_HEAP_NODE *workNode = heapArray [workIx];    while ((workIx > 0) && (heapArray [parentIx]->key > workNode->key))	{	heapArray [workIx] = heapArray [parentIx];	workIx = parentIx;	parentIx = (workIx - 1) / 2;	}    heapArray [workIx] = workNode;    pQPriHeapHead->pHighNode = heapArray [0];    }/********************************************************************************* qPriHeapDown - move a node down to its proper place in the heap tree** This routine moves a node down to its proper place in the heap tree.*/LOCAL void qPriHeapDown    (    Q_PRI_HEAP_HEAD *pQPriHeapHead,    int index    )    {    int workIx   = index;    int lesserChildIx;    int leftChildIx = 2 * workIx + 1;    int rightChildIx = leftChildIx + 1;    Q_PRI_HEAP_NODE **heapArray = *pQPriHeapHead->pHeapArray;    Q_PRI_HEAP_NODE *workNode = heapArray [workIx];    while (leftChildIx < pQPriHeapHead->heapIndex)	{	if ((rightChildIx >= pQPriHeapHead->heapIndex) ||	    (heapArray [leftChildIx]->key < heapArray [rightChildIx]->key))	    lesserChildIx = leftChildIx;	else	    lesserChildIx = rightChildIx;	if (heapArray [lesserChildIx]->key < workNode->key)	    {	    heapArray [workIx] = heapArray [lesserChildIx];	    workIx = lesserChildIx;	    }	else	    break;	leftChildIx  = 2 * workIx + 1;	rightChildIx = 2 * workIx + 2;	}    heapArray [workIx] = workNode;    pQPriHeapHead->pHighNode = heapArray [0];    }#endif	/* qPriHeapLib_PORTABLE *//********************************************************************************* qPriHeapShow - dump the heap in human readable form by key or node** This routine prints a humun readable representation of the heap to standard* out.  The two output formats are selected as: 0 node format, 1 key format.** CAVEATS* The output is only printed for the first 16 nodes, because beyond this the* output is unintelligible.*/void qPriHeapShow    (    Q_PRI_HEAP_HEAD *pHeap,     /* pointer to heap head to dump */    int format                  /* 0 - node format; 1 - key format */    )    {    int ix;    char gap[100];    char halfgap[100];    char *space = "                                               ";    int nodesPerLine = 1;    int endOfLine = 0;    int fmtlen = 3;    int limit = 15;    if (pHeap->heapIndex > 0)	printf ("First: %x\n", pHeap->pHighNode);    else	printf ("First: NULL\n");    if (format > 0)	{	limit = 7;	fmtlen = 8;	printf ("%24s"," ");	}    else	printf ("%29s"," ");    for (ix = 0; ix < min (pHeap->heapIndex, limit); ix ++)	{	if (ix == endOfLine)	    {	    strncpy (gap, space, 32 / nodesPerLine);	    gap [(32 / nodesPerLine) - fmtlen] = EOS;	    strncpy (halfgap, space, 16 / nodesPerLine);	    halfgap [(16 / nodesPerLine) - fmtlen] = EOS;	    nodesPerLine = nodesPerLine << 1;	    endOfLine += nodesPerLine;	    if (format > 0)		printf ("%8x\n%s", (*pHeap->pHeapArray)[ix], halfgap);	    else		printf ("%3d\n%s", (*pHeap->pHeapArray)[ix]->key, halfgap);	    }	else	    if (format > 0)		printf ("%8x%s", (*pHeap->pHeapArray)[ix], gap);	    else		printf ("%3d%s", (*pHeap->pHeapArray)[ix]->key, gap);	}    if (ix == limit)	printf ("\nTerminated at %d nodes because output gets ugly.\n", limit);    else	printf ("\n");    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美国三级日本三级久久99| 日韩精品一区二区三区视频在线观看 | 亚洲国产精品自拍| 亚洲国产视频直播| 久久激情五月激情| 国产+成+人+亚洲欧洲自线| 波多野结衣在线一区| 色菇凉天天综合网| 制服丝袜亚洲网站| 波多野结衣在线aⅴ中文字幕不卡| 99久久婷婷国产综合精品电影 | 亚洲国产综合色| 精品一区二区三区蜜桃| 91蝌蚪国产九色| 精品国产一区二区三区四区四 | 成人激情图片网| 精品视频1区2区| 国产婷婷一区二区| 亚洲第一成人在线| 国产在线国偷精品免费看| 色综合天天综合在线视频| 91精品国产麻豆国产自产在线 | 丝袜美腿亚洲一区| 成人丝袜高跟foot| 717成人午夜免费福利电影| 久久免费电影网| 亚洲视频精选在线| 久88久久88久久久| 色成人在线视频| 国产午夜亚洲精品不卡| 午夜精品视频在线观看| av成人老司机| 欧美成人福利视频| 亚洲成人自拍偷拍| 成人精品视频.| 欧美成人a在线| 亚洲一区二区视频在线| 成人动漫av在线| 久久综合狠狠综合| 秋霞影院一区二区| 91福利精品视频| 亚洲国产精品成人久久综合一区| 久久成人免费日本黄色| 欧美色爱综合网| 亚洲免费成人av| 丁香婷婷综合激情五月色| 精品国产伦一区二区三区观看方式 | 欧美变态tickling挠脚心| 亚洲一区在线观看免费观看电影高清 | 欧亚洲嫩模精品一区三区| 亚洲午夜国产一区99re久久| 成人中文字幕在线| 久久影院午夜论| 看电视剧不卡顿的网站| 欧美精品亚洲二区| 亚洲一级片在线观看| 色网综合在线观看| 亚洲视频精选在线| va亚洲va日韩不卡在线观看| 国产夜色精品一区二区av| 91精品国产全国免费观看| 日韩欧美久久一区| 美女网站一区二区| 欧美一级生活片| 欧美aaa在线| 制服丝袜中文字幕一区| 一区二区三区日韩欧美精品| 99精品久久只有精品| 国产精品久久看| 国产大片一区二区| 欧美不卡在线视频| 久久99精品久久久久婷婷| 91精品国产91久久久久久一区二区 | 日韩欧美国产综合| 青青草原综合久久大伊人精品 | 中文字幕一区视频| 成人av在线资源网站| 久久丝袜美腿综合| 国产一区二区三区四区五区美女| 日韩美女在线视频 | 有码一区二区三区| 97精品电影院| 一区二区三区国产豹纹内裤在线| 国产传媒一区在线| 一区在线观看视频| 91国偷自产一区二区三区观看| 亚洲男帅同性gay1069| 懂色av中文一区二区三区| 久久久久久久综合日本| 成人福利电影精品一区二区在线观看 | 午夜欧美大尺度福利影院在线看 | 美女在线一区二区| 精品国产一区二区三区久久影院 | 国产亚洲欧美色| 国产成人av影院| 亚洲视频一二三| 欧美日韩卡一卡二| 视频一区免费在线观看| 337p亚洲精品色噜噜| 国内精品免费在线观看| 中文字幕av一区二区三区 | 亚洲国产综合91精品麻豆| 337p亚洲精品色噜噜噜| 国内精品国产成人国产三级粉色| 欧美激情综合五月色丁香小说| 91浏览器在线视频| 日韩av中文字幕一区二区| 欧美精品一区二区三区蜜桃视频| 成人免费看的视频| 亚洲午夜久久久久| 亚洲精品一区二区三区精华液 | 中文字幕精品一区二区三区精品 | 亚洲一区在线电影| 精品日韩一区二区三区| 成人国产精品免费| 午夜av区久久| 欧美激情一区二区三区全黄| 91国产成人在线| 美女视频黄久久| 亚洲国产精品成人综合色在线婷婷| 欧美xxxx在线观看| 国产不卡免费视频| 亚洲精品中文在线| 日韩一区二区免费在线电影| 成人免费视频视频| 亚洲成人免费影院| 欧美www视频| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲精品视频观看| 精品欧美一区二区三区精品久久| 91在线国内视频| 精品一区二区在线播放| 亚洲图片一区二区| 国产欧美精品在线观看| 欧美日韩久久久久久| www.欧美色图| 麻豆成人久久精品二区三区红| 亚洲欧洲日韩综合一区二区| 欧美一区二区三区四区在线观看| 成人动漫一区二区| 老司机免费视频一区二区三区| 一区二区三区在线观看网站| 久久久蜜桃精品| 日韩三级免费观看| 欧美视频三区在线播放| av资源网一区| 国产精品一区一区三区| 亚洲成人黄色小说| 亚洲视频一二三区| 国产无一区二区| 欧美人伦禁忌dvd放荡欲情| av在线播放成人| 国产一区二区日韩精品| 亚洲bt欧美bt精品777| 国产精品免费视频网站| 欧美xxxxx裸体时装秀| 色综合一个色综合亚洲| 久久激情五月婷婷| 偷拍与自拍一区| 亚洲欧美一区二区视频| 欧美一区二区在线不卡| 成人精品免费网站| 久久精品国产免费| 亚洲综合免费观看高清在线观看| 精品国产欧美一区二区| 91精品国产色综合久久不卡电影 | 精品久久久久久久久久久院品网 | 成人动漫av在线| 懂色av噜噜一区二区三区av| 激情丁香综合五月| 捆绑调教一区二区三区| 石原莉奈在线亚洲三区| 亚洲一区二区三区影院| 亚洲精品国久久99热| 中文字幕亚洲视频| 国产精品毛片久久久久久久| 国产午夜精品福利| 久久精品一区四区| 久久精子c满五个校花| 久久精品欧美一区二区三区麻豆| 欧美日韩成人综合| 精品污污网站免费看| 欧美日韩在线播| 欧美精品在线视频| 在线不卡免费欧美| 日韩一区二区免费视频| 欧美第一区第二区| 欧美videos大乳护士334| 精品99999| 欧美经典一区二区| 国产精品久久久久久亚洲毛片| 亚洲欧洲精品一区二区三区 | 一本一道久久a久久精品| 色噜噜狠狠成人网p站| 色国产综合视频| 欧美日韩大陆在线| 日韩欧美卡一卡二| 国产欧美精品在线观看| 亚洲视频小说图片| 亚洲h精品动漫在线观看|