Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24078
b: refs/heads/master
c: fec433a
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Dobson authored and Linus Torvalds committed Mar 26, 2006
1 parent 466c24b commit a461faf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26b6e051bc36b968a0b5ac96903b99e050d20b87
refs/heads/master: fec433aaaae32a02329ad7d71b0f3c91b7525077
8 changes: 8 additions & 0 deletions trunk/include/linux/mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <linux/wait.h>

struct kmem_cache;

typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
typedef void (mempool_free_t)(void *element, void *pool_data);

Expand Down Expand Up @@ -37,6 +39,12 @@ extern void mempool_free(void *element, mempool_t *pool);
*/
void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
void mempool_free_slab(void *element, void *pool_data);
static inline mempool_t *
mempool_create_slab_pool(int min_nr, struct kmem_cache *kc)
{
return mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab,
(void *) kc);
}

/*
* 2 mempool_alloc_t's and a mempool_free_t to kmalloc/kzalloc and kfree
Expand Down

0 comments on commit a461faf

Please sign in to comment.