aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mempool.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mempool.h b/include/linux/mempool.h
index f2427d7394b0..9787572e0ae7 100644
--- a/include/linux/mempool.h
+++ b/include/linux/mempool.h
@@ -38,4 +38,16 @@ extern void mempool_free(void *element, mempool_t *pool);
38void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data); 38void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
39void mempool_free_slab(void *element, void *pool_data); 39void mempool_free_slab(void *element, void *pool_data);
40 40
41/*
42 * A mempool_alloc_t and mempool_free_t for a simple page allocator that
43 * allocates pages of the order specified by pool_data
44 */
45void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data);
46void mempool_free_pages(void *element, void *pool_data);
47static inline mempool_t *mempool_create_page_pool(int min_nr, int order)
48{
49 return mempool_create(min_nr, mempool_alloc_pages, mempool_free_pages,
50 (void *)(long)order);
51}
52
41#endif /* _LINUX_MEMPOOL_H */ 53#endif /* _LINUX_MEMPOOL_H */