change thread_list to thread_pool

This commit is contained in:
Ryo Nakamura
2024-02-10 22:34:03 +09:00
parent bfc955a9a7
commit d6f437bcb1
4 changed files with 39 additions and 46 deletions

View File

@@ -53,8 +53,10 @@ int pool_push_lock(pool *p, void *v);
void *pool_pop(pool *p);
void *pool_pop_lock(pool *p);
/* pool_get() returns value indexed by idx */
void *pool_get(pool *p, unsigned int idx);
#define pool_size(p) ((p)->num)
#define pool_get(p, idx) ((p->num <= idx) ? NULL : p->array[idx])
/*
* pool->idx indicates next *v in an iteration. This has two