Environment variables WIP, fix waiting scheduling issues + CE cancel proc
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m24s

This commit is contained in:
2026-03-17 00:01:15 +01:00
parent 1b1e1e4954
commit b1648a146a
11 changed files with 91 additions and 54 deletions

View File

@@ -31,14 +31,20 @@ int id_alloc (struct id_alloc* ida) {
spin_lock (&ida->lock, &fid);
for (size_t bit = 0; bit < ida->bm.nbits; bit++) {
if (!bm_test (&ida->bm, bit)) {
bm_set (&ida->bm, bit);
size_t start = ida->next_id;
size_t current = start;
do {
if (!bm_test (&ida->bm, current)) {
bm_set (&ida->bm, current);
ida->next_id = (current + 1) % ida->bm.nbits;
spin_unlock (&ida->lock, fid);
return (int)bit;
return (int)current;
}
}
current = (current + 1) % ida->bm.nbits;
} while (current != start);
spin_unlock (&ida->lock, fid);
return -ST_OOM_ERROR;