Commit 12ea6539 authored by Matthew Wilcox's avatar Matthew Wilcox

radix tree test suite: Remove types.h

Move the pieces we still need to tools/include and update a few implicit
includes.
Signed-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
parent a3c78907
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#endif #endif
#define __user #define __user
#define __rcu
#define __read_mostly
#ifndef __attribute_const__ #ifndef __attribute_const__
# define __attribute_const__ # define __attribute_const__
...@@ -50,6 +52,8 @@ ...@@ -50,6 +52,8 @@
# define unlikely(x) __builtin_expect(!!(x), 0) # define unlikely(x) __builtin_expect(!!(x), 0)
#endif #endif
#define uninitialized_var(x) x = *(&(x))
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
#include <linux/types.h> #include <linux/types.h>
......
#define spinlock_t pthread_mutex_t
#define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;
#define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x)
#define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x)
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <unistd.h> #include <unistd.h>
#include <assert.h> #include <assert.h>
#include <linux/gfp.h>
#include <linux/poison.h> #include <linux/poison.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/radix-tree.h> #include <linux/radix-tree.h>
......
#ifndef _GFP_H #ifndef _GFP_H
#define _GFP_H #define _GFP_H
#include <linux/types.h>
#define __GFP_BITS_SHIFT 26 #define __GFP_BITS_SHIFT 26
#define __GFP_BITS_MASK ((gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) #define __GFP_BITS_MASK ((gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
......
#ifndef _TYPES_H
#define _TYPES_H
#include "../../include/linux/types.h"
#define __rcu
#define __read_mostly
static inline void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list;
list->prev = list;
}
typedef struct {
unsigned int x;
} spinlock_t;
#define uninitialized_var(x) x = x
#include <linux/gfp.h>
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment