]> err.no Git - linux-2.6/blobdiff - include/linux/slab.h
BKL: revert back to the old spinlock implementation
[linux-2.6] / include / linux / slab.h
index f3a8eecd99f3c4b5eb68d10389e3b96546699f4d..805ed4b92f9a40dfd533330fb2bea5e423ed00e1 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef _LINUX_SLAB_H
 #define        _LINUX_SLAB_H
 
-#ifdef __KERNEL__
-
 #include <linux/gfp.h>
 #include <linux/types.h>
 
 #define SLAB_MEM_SPREAD                0x00100000UL    /* Spread some memory over cpuset */
 #define SLAB_TRACE             0x00200000UL    /* Trace allocations and frees */
 
+/* Flag to prevent checks on free */
+#ifdef CONFIG_DEBUG_OBJECTS
+# define SLAB_DEBUG_OBJECTS    0x00400000UL
+#else
+# define SLAB_DEBUG_OBJECTS    0x00000000UL
+#endif
+
 /* The following flags affect the page allocator grouping pages by mobility */
 #define SLAB_RECLAIM_ACCOUNT   0x00020000UL            /* Objects are reclaimable */
 #define SLAB_TEMPORARY         SLAB_RECLAIM_ACCOUNT    /* Objects are short-lived */
@@ -271,5 +276,9 @@ static inline void *kzalloc(size_t size, gfp_t flags)
        return kmalloc(size, flags | __GFP_ZERO);
 }
 
-#endif /* __KERNEL__ */
+#ifdef CONFIG_SLABINFO
+extern const struct seq_operations slabinfo_op;
+ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
+#endif
+
 #endif /* _LINUX_SLAB_H */