| 17 | } |
| 18 | |
| 19 | static int prp_pool_alloc(PRPPool* pool) |
| 20 | { |
| 21 | if (pool->free_bitmap == 0) return -1; |
| 22 | int idx = __builtin_ctzll(pool->free_bitmap); |
| 23 | pool->free_bitmap &= ~(1ULL << idx); |
| 24 | return idx; |
| 25 | } |
| 26 | |
| 27 | static void prp_pool_free(PRPPool* pool, int idx) |
| 28 | { |