Lines Matching defs:p2
53 static uint32_t test2AllocId(struct TestMap2 *p2)
58 int32_t idChunk = ++p2->idChunkPrev;
62 idChunk = ASMBitNextClear(&p2->bmChunkId[0], TEST2_ID_LAST + 1, idChunk);
65 if (ASMAtomicBitTestAndSet(&p2->bmChunkId[0], idChunk))
70 return p2->idChunkPrev = idChunk;
77 idChunk = ASMBitFirstClear(&p2->bmChunkId[0], TEST2_ID_LAST + 1);
83 if (ASMAtomicBitTestAndSet(&p2->bmChunkId[0], idChunk))
89 return p2->idChunkPrev = idChunk;
95 struct TestMap2 *p2 = (struct TestMap2 *)RTTestGuardedAllocTail(hTest, sizeof(TestMap2));
96 p2->idNil = NIL_TEST2_ID;
97 p2->idLast = TEST2_ID_LAST;
100 RT_ZERO(p2->bmChunkId);
101 RTTEST_CHECK(hTest, ASMBitFirstSet(&p2->bmChunkId[0], TEST2_ID_LAST + 1) == -1);
103 RTTEST_CHECK(hTest, !ASMBitTest(&p2->bmChunkId[0], iBit));
105 memset(&p2->bmChunkId[0], 0xff, sizeof(p2->bmChunkId));
106 RTTEST_CHECK(hTest, ASMBitFirstClear(&p2->bmChunkId[0], TEST2_ID_LAST + 1) == -1);
108 RTTEST_CHECK(hTest, ASMBitTest(&p2->bmChunkId[0], iBit));
111 p2->idChunkPrev = 0;
112 RT_ZERO(p2->bmChunkId);
113 ASMBitSet(p2->bmChunkId, NIL_TEST2_ID);
116 test2AllocId(p2);
118 RTTEST_CHECK(hTest, ASMBitFirstClear(&p2->bmChunkId[0], TEST2_ID_LAST + 1) == -1);