Lines Matching refs:pool

66 void ufdt_node_pool_construct(struct ufdt_node_pool *pool) {  in ufdt_node_pool_construct()  argument
67 pool->first_block = NULL; in ufdt_node_pool_construct()
68 pool->last_block_ptr = &pool->first_block; in ufdt_node_pool_construct()
71 void ufdt_node_pool_destruct(struct ufdt_node_pool *pool) { in ufdt_node_pool_destruct() argument
73 struct ufdt_node_pool_block_header *block = pool->first_block; in ufdt_node_pool_destruct()
86 pool->first_block = NULL; in ufdt_node_pool_destruct()
87 pool->last_block_ptr = NULL; in ufdt_node_pool_destruct()
144 struct ufdt_node_pool *pool, struct ufdt_node_pool_block_header *block) { in _ufdt_node_pool_preppend_block() argument
145 struct ufdt_node_pool_block_header *origin_first_block = pool->first_block; in _ufdt_node_pool_preppend_block()
148 pool->first_block = block; in _ufdt_node_pool_preppend_block()
150 pool->last_block_ptr = &block->next_block; in _ufdt_node_pool_preppend_block()
155 struct ufdt_node_pool *pool, struct ufdt_node_pool_block_header *block) { in _ufdt_node_pool_append_block() argument
158 *pool->last_block_ptr = block; in _ufdt_node_pool_append_block()
159 pool->last_block_ptr = &block->next_block; in _ufdt_node_pool_append_block()
163 struct ufdt_node_pool *pool, in _ufdt_node_pool_remove_block() argument
170 pool->last_block_ptr = block_ptr; in _ufdt_node_pool_remove_block()
176 void *ufdt_node_pool_alloc(struct ufdt_node_pool *pool) { in ufdt_node_pool_alloc() argument
183 struct ufdt_node_pool_block_header *block = pool->first_block; in ufdt_node_pool_alloc()
186 _ufdt_node_pool_preppend_block(pool, block); in ufdt_node_pool_alloc()
192 if (block->first_free_entry == NULL && *pool->last_block_ptr != block) { in ufdt_node_pool_alloc()
193 _ufdt_node_pool_remove_block(pool, &pool->first_block); in ufdt_node_pool_alloc()
194 _ufdt_node_pool_append_block(pool, block); in ufdt_node_pool_alloc()
201 struct ufdt_node_pool *pool, void *node) { in _ufdt_node_pool_search_block() argument
202 struct ufdt_node_pool_block_header **block_ptr = &pool->first_block; in _ufdt_node_pool_search_block()
218 void ufdt_node_pool_free(struct ufdt_node_pool *pool, void *node) { in ufdt_node_pool_free() argument
224 _ufdt_node_pool_search_block(pool, node); in ufdt_node_pool_free()
232 _ufdt_node_pool_remove_block(pool, block_ptr); in ufdt_node_pool_free()
236 if (block->alloc_entry_cnt == 0 && pool->first_block != NULL && in ufdt_node_pool_free()
237 pool->first_block->first_free_entry != NULL) { in ufdt_node_pool_free()
242 _ufdt_node_pool_preppend_block(pool, block); in ufdt_node_pool_free()