Lines Matching defs:Key

103  * @param   Key         The first key in the range.
106 static bool TrackerInsert(PTRACKER pTracker, uint32_t Key, uint32_t KeyLast)
108 bool fRc = !ASMBitTestAndSet(pTracker->abBitmap, Key);
111 while (KeyLast != Key)
128 * @param Key The first key in the range.
131 static bool TrackerRemove(PTRACKER pTracker, uint32_t Key, uint32_t KeyLast)
133 bool fRc = ASMBitTestAndClear(pTracker->abBitmap, Key);
136 while (KeyLast != Key)
163 uint32_t Key = RTRandAdvU32Ex(g_hRand, 0, pTracker->MaxKey - 1);
164 if (ASMBitTest(pTracker->abBitmap, Key))
169 int Key2 = ASMBitNextClear(pTracker->abBitmap, pTracker->MaxKey, Key);
171 Key = Key2;
177 const uint32_t KeyPrev = Key;
178 Key = RTRandAdvU32Ex(g_hRand, 0, KeyPrev - 1);
179 if (!ASMBitTest(pTracker->abBitmap, Key))
181 Key2 = ASMBitNextClear(pTracker->abBitmap, RT_ALIGN_32(KeyPrev, 32), Key);
184 Key = Key2;
196 KeyLast = Key;
199 uint32_t cKeys = RTRandAdvU32Ex(g_hRand, 0, RT_MIN(pTracker->MaxKey - Key, cMaxKeys - 1));
200 KeyLast = Key + cKeys;
201 int Key2 = ASMBitNextSet(pTracker->abBitmap, RT_ALIGN_32(KeyLast, 32), Key);
210 *pKey = Key;
241 uint32_t Key = RTRandAdvU32Ex(g_hRand, 0, pTracker->MaxKey - 1);
242 if (!ASMBitTest(pTracker->abBitmap, Key))
247 int Key2 = ASMBitNextSet(pTracker->abBitmap, pTracker->MaxKey, Key);
249 Key = Key2;
254 uint32_t *pu32Cur = (uint32_t *)&pTracker->abBitmap[Key >> 8];
270 Key = Key2;
274 *pKey = Key;
342 pNode->Key = i;
388 pNode->Key = i;
434 pNode->Key = i;
454 RTGCPHYS Key = pNode->Key;
455 pNode = RTAvloGCPhysRemove(pTree, Key);
458 RTTestIFailed("linear root remove i=%d Key=%d\n", i, (unsigned)Key);
465 pNode = RTAvloGCPhysRemove(pTree, Key);
468 RTTestIFailed("linear root negative remove i=%d Key=%d\n", i, (unsigned)Key);
488 pNode->Key = i;
517 if (pNode->Key - (unsigned long)i >= 8 * 4)
519 RTTestIFailed("sparse remove i=%d j=%d Key=%d\n", i, j, (unsigned)pNode->Key);
558 uint32_t Key;
559 if (!TrackerNewRandom(pTracker, &Key))
566 pNode->Key = Key;
569 RTTestIFailed("random insert i=%d Key=%#x\n", i, Key);
576 RTTestIFailed("linear negative insert i=%d Key=%#x\n", i, Key);
579 TrackerInsert(pTracker, Key, Key);
588 uint32_t Key;
589 if (!TrackerFindRandom(pTracker, &Key))
596 PAVLOGCPHYSNODECORE pNode = RTAvloGCPhysRemove(pTree, Key);
599 RTTestIFailed("random remove i=%d Key=%#x\n", i, Key);
602 if (pNode->Key != Key)
604 RTTestIFailed("random remove i=%d Key=%#x pNode->Key=%#x\n", i, Key, (unsigned)pNode->Key);
607 TrackerRemove(pTracker, Key, Key);
643 pNode->Key = i;
657 Node.Key = RT_MIN(j, k);
677 if (pNode->Key > i || pNode->KeyLast < i)
679 RTTestIFailed("linear get i=%d Key=%d KeyLast=%d\n", i, (unsigned)pNode->Key, (unsigned)pNode->KeyLast);
732 pNode->Key = i;
745 for (k = pNode->Key; k < kMax; k++)
747 Node.Key = RT_MIN(j, k);
773 if (pNode->Key > KeyBase || pNode->KeyLast < KeyBase)
775 RTTestIFailed("sparse get i=%d j=%d KeyBase=%d pNode->Key=%d\n", i, j, (unsigned)KeyBase, (unsigned)pNode->Key);
815 RTGCPHYS Key = KeyBase + ((i / 19) % 4);
816 if (RTAvlroGCPhysRangeRemove(pTree, Key) != pNode)
818 RTTestIFailed("sparse remove i=%d j=%d Key=%d\n", i, j, (unsigned)Key);
844 s1.aNode[0].Key = 0x00030000;
846 s1.aNode[1].Key = 0x000a0000;
848 s1.aNode[2].Key = 0xe0000000;
850 s1.aNode[3].Key = 0xfffe0000;
865 if (RTAvlroGCPhysGet(&s1.Tree, pNode->Key) != pNode)
875 if (RTAvlroGCPhysRangeGet(&s1.Tree, pNode->Key) != pNode)
880 if (RTAvlroGCPhysRangeGet(&s1.Tree, pNode->Key + 1) != pNode)
897 if (RTAvlroGCPhysGet(&s3.Tree, pNode->Key) != pNode)
902 if (RTAvlroGCPhysRangeGet(&s3.Tree, pNode->Key) != pNode)
908 j = pNode->Key + 1;
941 pNode->Key = i;
984 pNode->Key = i;