summaryrefslogtreecommitdiff
path: root/tools/testing/radix-tree/linux/kernel.h
blob: 63fce553781a3d5c659575a70abc4745d59fcc5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _KERNEL_H
#define _KERNEL_H

#include "../../include/linux/kernel.h"
#include <string.h>
#include <stdio.h>
#include <limits.h>

#include <linux/compiler.h>
#include <linux/err.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include "../../../include/linux/kconfig.h"

#ifdef BENCHMARK
#define RADIX_TREE_MAP_SHIFT	6
#else
#define RADIX_TREE_MAP_SHIFT	3
#endif

#define printk printf
#define pr_debug printk
#define pr_cont printk

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

#define xchg(ptr, x)	uatomic_xchg(ptr, x)

#endif /* _KERNEL_H */