Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _LINUX_MEMPOOL_H
     13 #define _LINUX_MEMPOOL_H
     14 
     15 #include <linux/wait.h>
     16 
     17 struct kmem_cache;
     18 
     19 typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
     20 typedef void (mempool_free_t)(void *element, void *pool_data);
     21 
     22 typedef struct mempool_s {
     23  spinlock_t lock;
     24  int min_nr;
     25  int curr_nr;
     26  void **elements;
     27 
     28  void *pool_data;
     29  mempool_alloc_t *alloc;
     30  mempool_free_t *free;
     31  wait_queue_head_t wait;
     32 } mempool_t;
     33 
     34 #endif
     35