mirror of
https://github.com/upa/mscp.git
synced 2026-02-14 00:54:43 +08:00
change chunk_pool from list to pool
This commit is contained in:
11
src/pool.c
11
src/pool.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user