change chunk_pool from list to pool

This commit is contained in:
Ryo Nakamura
2024-02-11 21:28:03 +09:00
parent d65a49768c
commit a828ca3f5a
7 changed files with 89 additions and 722 deletions

View File

@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-only */
#include <string.h>
#include <stdlib.h>
#include <pool.h>
@@ -112,3 +112,12 @@ void *pool_iter_next_lock(pool *p)
pool_unlock(p);
return v;
}
bool pool_iter_check_next_lock(pool *p)
{
bool next_exist;
pool_lock(p);
next_exist = (p->idx < p->num);
pool_unlock(p);
return next_exist;
}