Skip to content

Commit 12ea653

Browse files
author
Matthew Wilcox
committed
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: Matthew Wilcox <mawilcox@microsoft.com>
1 parent a3c7890 commit 12ea653

5 files changed

Lines changed: 12 additions & 23 deletions

File tree

‎tools/include/linux/compiler.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#endif
2222

2323
#define __user
24+
#define __rcu
25+
#define __read_mostly
2426

2527
#ifndef __attribute_const__
2628
# define __attribute_const__
@@ -50,6 +52,8 @@
5052
# define unlikely(x) __builtin_expect(!!(x), 0)
5153
#endif
5254

55+
#define uninitialized_var(x) x = *(&(x))
56+
5357
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
5458

5559
#include <linux/types.h>

‎tools/include/linux/spinlock.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#define spinlock_t pthread_mutex_t
2+
#define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;
3+
4+
#define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x)
5+
#define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x)

‎tools/testing/radix-tree/linux.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <unistd.h>
66
#include <assert.h>
77

8+
#include <linux/gfp.h>
89
#include <linux/poison.h>
910
#include <linux/slab.h>
1011
#include <linux/radix-tree.h>

‎tools/testing/radix-tree/linux/gfp.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef _GFP_H
22
#define _GFP_H
33

4+
#include <linux/types.h>
5+
46
#define __GFP_BITS_SHIFT 26
57
#define __GFP_BITS_MASK ((gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
68

‎tools/testing/radix-tree/linux/types.h‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)