Add a build system

This commit is contained in:
2026-04-29 22:28:21 +01:00
parent 5cb47a17a2
commit fb83c3114f
22 changed files with 761 additions and 93 deletions

View File

@@ -306,21 +306,21 @@ static void mpmc_task_done(MPMCQueue *q, u8 consumer_count) {
/* ----------------------------------------------------------- */
/* MPMC Cleanup */
/* ----------------------------------------------------------- */
static void mpmc_finish(MPMCQueue *q) {
if (!q)
return;
if (q->slots) {
plat_mem_release(q->slots, 0);
q->slots = NULL;
}
plat_sem_destroy(&q->items_sem);
q->capacity = 0;
q->mask = 0;
atomic_store_explicit(&q->head, 0, memory_order_relaxed);
atomic_store_explicit(&q->tail, 0, memory_order_relaxed);
atomic_store_explicit(&q->committed, 0, memory_order_relaxed);
}
// static void mpmc_finish(MPMCQueue *q) { // Comment to prevent warning: unused function
// if (!q)
// return;
//
// if (q->slots) {
// plat_mem_release(q->slots, 0);
// q->slots = NULL;
// }
//
// plat_sem_destroy(&q->items_sem);
//
// q->capacity = 0;
// q->mask = 0;
//
// atomic_store_explicit(&q->head, 0, memory_order_relaxed);
// atomic_store_explicit(&q->tail, 0, memory_order_relaxed);
// atomic_store_explicit(&q->committed, 0, memory_order_relaxed);
// }