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

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

?? qpriheaplib.c

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲三级电影全部在线观看高清| 麻豆成人免费电影| 日韩电影一区二区三区四区| 丁香激情综合五月| 欧美精品在线观看一区二区| 国产精品成人免费| 久久精品国产色蜜蜜麻豆| 在线观看不卡一区| 日本一区二区动态图| 麻豆91精品91久久久的内涵| 欧美午夜精品理论片a级按摩| 国产清纯在线一区二区www| 日韩av二区在线播放| 欧美午夜影院一区| 综合激情成人伊人| 成人综合婷婷国产精品久久| 亚洲精品在线三区| 免费久久99精品国产| 欧美日韩在线播放一区| 一区二区三区高清在线| 99re这里只有精品首页| 国产精品视频看| 国产在线不卡一区| 精品日产卡一卡二卡麻豆| 日韩精品一区第一页| 欧美人与禽zozo性伦| 亚洲一区二区三区小说| 在线亚洲高清视频| 樱花草国产18久久久久| 色婷婷精品大在线视频| 亚洲激情五月婷婷| 色婷婷精品大视频在线蜜桃视频| 亚洲人成在线播放网站岛国| 成人av网址在线| 国产精品看片你懂得| 国产成人亚洲综合a∨婷婷图片| 久久夜色精品国产欧美乱极品| 精品一区在线看| 久久久无码精品亚洲日韩按摩| 国产成人在线网站| 国产精品成人免费在线| 91在线码无精品| 亚洲午夜免费视频| 337p亚洲精品色噜噜噜| 欧美a级理论片| 久久久久国产精品人| 99久久久久久| 亚洲午夜久久久久久久久久久| 欧美女孩性生活视频| 久久99精品久久久久久动态图| 国产午夜精品久久| 成人精品在线视频观看| 一区二区高清在线| 4438x亚洲最大成人网| 国产一区激情在线| 中文字幕亚洲电影| 欧美片在线播放| 国产乱子伦一区二区三区国色天香| 国产日韩欧美综合在线| 在线观看视频欧美| 久久精品国产99| 国产精品午夜久久| 色av成人天堂桃色av| 奇米色一区二区| 中文字幕在线观看一区| 欧美美女视频在线观看| 国产a久久麻豆| 亚洲福利一区二区三区| 国产嫩草影院久久久久| 欧美日韩一二三区| 国产精品性做久久久久久| 亚洲激情图片一区| 久久夜色精品国产噜噜av| 色天使色偷偷av一区二区| 久久国产综合精品| 亚洲欧美日韩精品久久久久| 欧美videos中文字幕| 在线观看av一区| 丰满亚洲少妇av| 美女一区二区在线观看| 亚洲精品久久久久久国产精华液| 精品三级在线观看| 欧美午夜精品免费| 成人av在线资源| 精品一区二区在线观看| 亚洲成人777| 亚洲日本一区二区| 久久免费视频色| 91精品国产免费| 在线视频国产一区| 成人高清免费观看| 国产综合久久久久久鬼色| 亚洲成人免费在线观看| 中文字幕一区二区三区乱码在线| 精品久久国产字幕高潮| 在线成人av网站| 欧美综合在线视频| 色偷偷久久人人79超碰人人澡| 国产成人免费网站| 国产一区在线观看视频| 麻豆精品国产91久久久久久| 日韩1区2区日韩1区2区| 天堂资源在线中文精品| 亚洲精品乱码久久久久久久久| 国产精品美女一区二区| 欧美国产成人在线| 国产日韩欧美不卡在线| 2023国产精品自拍| 精品少妇一区二区三区视频免付费 | 久久精品免费看| 天天综合日日夜夜精品| 婷婷激情综合网| 视频一区二区三区中文字幕| 亚洲一区二区av在线| 一区二区三区在线免费播放| 亚洲特黄一级片| 悠悠色在线精品| 亚洲成人一区二区在线观看| 性久久久久久久久| 日韩和欧美一区二区| 蜜臂av日日欢夜夜爽一区| 免费av网站大全久久| 琪琪一区二区三区| 理论电影国产精品| 国产精品自拍在线| 成人免费视频国产在线观看| 91亚洲精品乱码久久久久久蜜桃| 日本精品裸体写真集在线观看| 欧美性猛片xxxx免费看久爱| 欧美三级午夜理伦三级中视频| 欧美日韩高清一区二区| 日韩欧美精品在线视频| 91精品国产综合久久蜜臀| 欧美成人欧美edvon| 亚洲国产成人午夜在线一区 | 亚洲乱码国产乱码精品精的特点| 一区二区三区免费看视频| 一区二区三区.www| 日本午夜精品一区二区三区电影 | 国产成人午夜电影网| 97精品视频在线观看自产线路二| 欧美性videosxxxxx| 日韩精品一区在线观看| 中文字幕一区二区三| 日韩不卡在线观看日韩不卡视频| 国产在线视视频有精品| 色婷婷香蕉在线一区二区| 日韩一区二区免费高清| 国产精品天干天干在线综合| 亚洲第一福利视频在线| 国产麻豆欧美日韩一区| 欧美伊人久久大香线蕉综合69| 欧美成人精品高清在线播放 | 免费人成精品欧美精品 | 精品视频全国免费看| 2021国产精品久久精品| 亚洲欧美一区二区三区久本道91 | 91丝袜美腿高跟国产极品老师 | 欧美日韩在线综合| 精品播放一区二区| 一区二区三区不卡在线观看 | 国产精品传媒视频| 日韩不卡免费视频| 99久久夜色精品国产网站| 日韩一区二区中文字幕| 亚洲精品福利视频网站| 国产一二三精品| 欧美放荡的少妇| 亚洲人亚洲人成电影网站色| 精品在线观看免费| 欧美色图天堂网| 国产精品欧美久久久久一区二区| 美日韩一区二区| 欧美日韩国产影片| 亚洲伦理在线免费看| 成人午夜又粗又硬又大| 欧美zozo另类异族| 婷婷六月综合亚洲| 欧亚一区二区三区| 亚洲素人一区二区| 成人黄色综合网站| 精品盗摄一区二区三区| 日韩电影免费一区| 精品视频在线免费| 亚洲精品ww久久久久久p站| 不卡av在线网| 国产精品丝袜久久久久久app| 狠狠色丁香婷婷综合| 日韩你懂的在线观看| 日本欧美大码aⅴ在线播放| 欧美色图一区二区三区| 一区二区在线免费观看| 91精彩视频在线| 日韩精品亚洲一区| 色94色欧美sute亚洲线路一ni | 日本一区二区三区国色天香| 亚洲精品伦理在线| 91香蕉视频污| 亚洲欧美日韩人成在线播放| 91香蕉视频mp4|