]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - tools/testing/radix-tree/linux/kernel.h
Reimplement IDR and IDA using the radix tree
[mirror_ubuntu-artful-kernel.git] / tools / testing / radix-tree / linux / kernel.h
CommitLineData
1366c37e
MW
1#ifndef _KERNEL_H
2#define _KERNEL_H
3
ab3a1ffd 4#include "../../include/linux/kernel.h"
1366c37e
MW
5#include <string.h>
6#include <stdio.h>
1366c37e
MW
7#include <limits.h>
8
c68a2aab
MW
9#include <linux/compiler.h>
10#include <linux/err.h>
11#include <linux/bitops.h>
12#include <linux/log2.h>
21ef5339 13#include "../../../include/linux/kconfig.h"
d42cb1a9 14
cfa40bcf
KK
15#ifdef BENCHMARK
16#define RADIX_TREE_MAP_SHIFT 6
17#else
97d778b2 18#define RADIX_TREE_MAP_SHIFT 3
cfa40bcf 19#endif
97d778b2 20
1366c37e 21#define printk printf
f518b160 22#define pr_debug printk
0a835c4f 23#define pr_cont printk
f518b160 24
1366c37e
MW
25#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
26
de1af8f6
MW
27#define xchg(ptr, x) uatomic_xchg(ptr, x)
28
1366c37e 29#endif /* _KERNEL_H */