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

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

?? qpriheaplib.c

?? VxWorks BSP框架源代碼包含頭文件和驅動
?? 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一区二区三区免费野_久草精品视频
亚洲亚洲精品在线观看| 国产精品国产a级| 制服丝袜亚洲精品中文字幕| 在线观看国产日韩| 欧美日本不卡视频| 9191久久久久久久久久久| 91麻豆精品国产| 精品国产伦一区二区三区观看方式| 欧美日本一道本| 精品人在线二区三区| 久久夜色精品国产欧美乱极品| 精品电影一区二区| 亚洲丝袜美腿综合| 日韩黄色片在线观看| 国产一区在线精品| 在线观看欧美日本| 国产欧美久久久精品影院 | 日本一二三不卡| 亚洲精品欧美激情| 奇米一区二区三区av| 97久久人人超碰| 日韩久久久久久| 亚洲同性gay激情无套| 狠狠色伊人亚洲综合成人| 99久久精品一区二区| 成人av在线播放网址| 国产麻豆精品在线观看| 日本韩国欧美三级| 久久综合九色综合97_久久久| 日韩美女精品在线| av电影天堂一区二区在线观看| 91精选在线观看| 日韩精品一二三四| 欧洲在线/亚洲| 亚洲欧美视频在线观看视频| 久久精品国产99国产| 日韩视频免费观看高清完整版在线观看 | 91麻豆精品久久久久蜜臀| 国产精品激情偷乱一区二区∴| 蜜臀久久99精品久久久画质超高清| a亚洲天堂av| 中文字幕日本乱码精品影院| 国产精品亚洲一区二区三区妖精| 精品嫩草影院久久| 国产精品小仙女| 国产欧美日韩视频一区二区| 国产精品一二三四五| 久久久精品免费观看| 丰满亚洲少妇av| 亚洲美女视频一区| 91精品福利在线一区二区三区| 午夜亚洲福利老司机| 欧美xxxxx牲另类人与| 国产一区二区三区免费观看| 欧美韩日一区二区三区四区| 成人性生交大片| 欧美激情艳妇裸体舞| 亚洲精品乱码久久久久久黑人| 成人黄页在线观看| 一卡二卡三卡日韩欧美| 69堂国产成人免费视频| 久热成人在线视频| 亚洲天堂免费在线观看视频| 欧美人与禽zozo性伦| 国产成人日日夜夜| 午夜精品福利一区二区三区av | 亚洲va欧美va国产va天堂影院| 欧美一区二区三区系列电影| 国产麻豆精品在线观看| 天天综合日日夜夜精品| 欧美国产精品专区| 在线播放日韩导航| 色综合色综合色综合 | 欧美一级一级性生活免费录像| 成人一区二区三区视频在线观看 | 色婷婷精品久久二区二区蜜臀av | 日韩欧美国产三级| 欧美性做爰猛烈叫床潮| youjizz久久| 国产精品1024| 极品少妇xxxx偷拍精品少妇| 亚洲成av人片www| 亚洲黄色尤物视频| 136国产福利精品导航| 国产清纯美女被跳蛋高潮一区二区久久w| 在线成人免费视频| 欧美色图一区二区三区| 精品视频123区在线观看| 亚洲丶国产丶欧美一区二区三区| 久久看人人爽人人| 国产喂奶挤奶一区二区三区| 久久久久97国产精华液好用吗| 日韩午夜av电影| 337p粉嫩大胆色噜噜噜噜亚洲 | 亚洲午夜激情网站| 亚洲第一成年网| 久久精品国产免费| 春色校园综合激情亚洲| av爱爱亚洲一区| 欧美体内she精高潮| 91麻豆精品国产91久久久久| 日韩免费性生活视频播放| 久久久国际精品| 一区二区三区日本| 久久精品国产精品亚洲精品| 成人影视亚洲图片在线| 欧美视频三区在线播放| 2020日本不卡一区二区视频| 亚洲日穴在线视频| 久久99久久久久| 一本到不卡精品视频在线观看| 4438亚洲最大| 亚洲天堂a在线| 韩国女主播成人在线观看| 色综合久久综合中文综合网| 久久久综合视频| 婷婷夜色潮精品综合在线| 成人av电影免费观看| 精品久久久久久最新网址| 亚洲一区二区三区在线| 成人99免费视频| 国产日韩精品视频一区| 精品一区二区三区在线观看| 欧美手机在线视频| 国产精品国产三级国产aⅴ原创| 久久99精品久久久久婷婷| 欧美理论在线播放| 亚洲综合色婷婷| 国产一区二区0| 欧美私模裸体表演在线观看| 国产精品久久久久久久第一福利| 国产成人免费在线视频| 久久久精品蜜桃| 国产99久久久精品| 国产欧美精品在线观看| 成人永久aaa| 亚洲精品视频一区| 精品视频一区三区九区| 视频在线观看国产精品| 日韩一区二区在线看| 日韩成人dvd| 久久精品人人做人人综合| 国产精品一区2区| 亚洲色图另类专区| 欧美日韩高清一区二区不卡| 日韩av网站免费在线| 中文一区二区在线观看| 91免费在线看| 久久国产欧美日韩精品| 国产精品女同互慰在线看| 欧美猛男gaygay网站| 久久99精品国产.久久久久| 久久久久久久久久美女| 91久久精品一区二区二区| 麻豆一区二区在线| 亚洲三级在线免费观看| 欧美大片在线观看一区| 99在线热播精品免费| 免费在线一区观看| 亚洲精品日韩专区silk| 日韩一区二区在线看| 91精品91久久久中77777| 国产美女视频91| 丝袜美腿高跟呻吟高潮一区| 亚洲另类在线一区| 久久久久国产一区二区三区四区| 欧美午夜片在线看| 99热在这里有精品免费| 丰满少妇在线播放bd日韩电影| 精品一区二区三区香蕉蜜桃| 日韩和欧美的一区| 亚洲亚洲人成综合网络| 亚洲自拍偷拍图区| 尤物视频一区二区| 国产精品毛片无遮挡高清| 亚洲国产精品高清| 在线成人av网站| 色综合久久久久久久久| 成人av在线一区二区三区| 国产成人日日夜夜| 精品亚洲免费视频| 三级久久三级久久| 亚洲大型综合色站| 一区二区三区高清| 一区二区国产视频| 欧美xxxxxxxx| 色婷婷av一区二区三区gif| 懂色中文一区二区在线播放| 男人操女人的视频在线观看欧美| 一区二区三区免费| 亚洲手机成人高清视频| 亚洲女同女同女同女同女同69| 欧美一区二区视频观看视频| 欧美男生操女生| 欧美大片在线观看一区| 久久免费视频一区| ●精品国产综合乱码久久久久| ㊣最新国产の精品bt伙计久久| 一区二区三区资源| 亚洲欧美国产77777|