OSDN Git Service

Check in released NDK version r4.
[android-x86/prebuilt.git] / ndk / android-ndk-r4 / darwin / platforms / android-5 / arch-x86 / usr / include / linux / mempool.h
diff --git a/ndk/android-ndk-r4/darwin/platforms/android-5/arch-x86/usr/include/linux/mempool.h b/ndk/android-ndk-r4/darwin/platforms/android-5/arch-x86/usr/include/linux/mempool.h
new file mode 100644 (file)
index 0000000..fa2432b
--- /dev/null
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MEMPOOL_H
+#define _LINUX_MEMPOOL_H
+
+#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);
+
+typedef struct mempool_s {
+ spinlock_t lock;
+ int min_nr;
+ int curr_nr;
+ void **elements;
+
+ void *pool_data;
+ mempool_alloc_t *alloc;
+ mempool_free_t *free;
+ wait_queue_head_t wait;
+} mempool_t;
+
+#endif