Lines Matching defs:alloc_fn
178 int mempool_init_node(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn,
185 pool->alloc = alloc_fn;
217 * @alloc_fn: user-defined element-allocation function.
226 int mempool_init(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn,
229 return mempool_init_node(pool, min_nr, alloc_fn, free_fn,
239 * @alloc_fn: user-defined element-allocation function.
245 * functions. This function might sleep. Both the alloc_fn() and the free_fn()
251 mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
254 return mempool_create_node(min_nr,alloc_fn,free_fn, pool_data,
259 mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
269 if (mempool_init_node(pool, min_nr, alloc_fn, free_fn, pool_data,
365 * this function only sleeps if the alloc_fn() function sleeps or