feat: add stack

This commit is contained in:
2025-09-10 16:45:50 +02:00
parent 9c037c5e25
commit 610bf5dab9
8 changed files with 161 additions and 12 deletions

View File

@@ -305,7 +305,13 @@ int vec_sort(vec_s *vec, int (*cmp)(const void *a, const void *b)) {
return -1;
}
if (mtx_lock(&vec->lock) != thrd_success) {
return -1;
}
qsort(vec->data, vec->size, vec->elem_size, cmp);
mtx_unlock(&vec->lock);
return 0;
}