Moved pool file out of external definition and replaced it with a flag (#176)

* Moved pool file out of external definition and replaced it with a flag
This commit is contained in:
MeirGavish
2025-10-22 22:43:02 +03:00
committed by GitHub
parent e45c1eeb22
commit a083d3de74
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ int pool_bm_get_free_idx(PoolBitmap *bm)
int bit = __builtin_ctz(inv);
bm->w[i] |= ((uint32_t)1 << bit);
int idx = i * POOL_BITS_PER_WORD + bit;
return (idx < bm->cap) ? idx : -1;
return (idx < bm->cap) ? idx : UNDEFINED;
}
}