Lines Matching refs:iBit

229 RTDECL(void) ASMBitSet(volatile void *pvBitmap, int32_t iBit)
232 pau8Bitmap[iBit / 8] |= (uint8_t)RT_BIT_32(iBit & 7);
235 RTDECL(void) ASMAtomicBitSet(volatile void *pvBitmap, int32_t iBit)
237 ASMBitSet(pvBitmap, iBit);
240 RTDECL(void) ASMBitClear(volatile void *pvBitmap, int32_t iBit)
243 pau8Bitmap[iBit / 8] &= ~((uint8_t)RT_BIT_32(iBit & 7));
246 RTDECL(void) ASMAtomicBitClear(volatile void *pvBitmap, int32_t iBit)
248 ASMBitClear(pvBitmap, iBit);
251 RTDECL(void) ASMBitToggle(volatile void *pvBitmap, int32_t iBit)
254 pau8Bitmap[iBit / 8] ^= (uint8_t)RT_BIT_32(iBit & 7);
257 RTDECL(void) ASMAtomicBitToggle(volatile void *pvBitmap, int32_t iBit)
259 ASMBitToggle(pvBitmap, iBit);
262 RTDECL(bool) ASMBitTestAndSet(volatile void *pvBitmap, int32_t iBit)
264 if (ASMBitTest(pvBitmap, iBit))
266 ASMBitSet(pvBitmap, iBit);
270 RTDECL(bool) ASMAtomicBitTestAndSet(volatile void *pvBitmap, int32_t iBit)
272 return ASMBitTestAndSet(pvBitmap, iBit);
275 RTDECL(bool) ASMBitTestAndClear(volatile void *pvBitmap, int32_t iBit)
277 if (!ASMBitTest(pvBitmap, iBit))
279 ASMBitClear(pvBitmap, iBit);
283 RTDECL(bool) ASMAtomicBitTestAndClear(volatile void *pvBitmap, int32_t iBit)
285 return ASMBitTestAndClear(pvBitmap, iBit);
288 RTDECL(bool) ASMBitTestAndToggle(volatile void *pvBitmap, int32_t iBit)
290 bool fRet = ASMBitTest(pvBitmap, iBit);
291 ASMBitToggle(pvBitmap, iBit);
295 RTDECL(bool) ASMAtomicBitTestAndToggle(volatile void *pvBitmap, int32_t iBit)
297 return ASMBitTestAndToggle(pvBitmap, iBit);
300 RTDECL(bool) ASMBitTest(const volatile void *pvBitmap, int32_t iBit)
303 return pau8Bitmap[iBit / 8] & (uint8_t)RT_BIT_32(iBit & 7) ? true : false;
308 uint32_t iBit = 0;
311 while (iBit < cBits)
319 iBit++;
321 if (iBit >= cBits)
323 return iBit;
326 iBit += 8;
335 int iBit = ++iBitPrev & 7;
336 if (iBit)
341 uint8_t u8 = ~pau8Bitmap[iBitPrev / 8] >> iBit;
344 iBit = 0;
348 iBit++;
350 return iBitPrev + iBit;
365 iBit = ASMBitFirstClear(&pau8Bitmap[iBitPrev / 8], cBits - iBitPrev);
366 if (iBit >= 0)
367 iBit += iBitPrev;
368 return iBit;
373 uint32_t iBit = 0;
375 while (iBit < cBits)
383 iBit++;
385 if (iBit >= cBits)
387 return iBit;
390 iBit += 8;
399 int iBit = ++iBitPrev & 7;
400 if (iBit)
405 uint8_t u8 = pau8Bitmap[iBitPrev / 8] >> iBit;
408 iBit = 0;
412 iBit++;
414 return iBitPrev + iBit;
429 iBit = ASMBitFirstSet(&pau8Bitmap[iBitPrev / 8], cBits - iBitPrev);
430 if (iBit >= 0)
431 iBit += iBitPrev;
432 return iBit;
437 uint32_t iBit;
438 for (iBit = 0; iBit < 32; iBit++)
439 if (u32 & RT_BIT_32(iBit))
440 return iBit + 1;
446 int32_t iBit = 32;
447 while (iBit-- > 0)
448 if (u32 & RT_BIT_32(iBit))
449 return iBit + 1;