xref: /linux/tools/testing/shared/maple-shared.h (revision 24d9e8b3c9c8a6f72c8b4c196a703e144928d919)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 #ifndef __MAPLE_SHARED_H__
3 #define __MAPLE_SHARED_H__
4 
5 #define CONFIG_DEBUG_MAPLE_TREE
6 #define CONFIG_MAPLE_SEARCH
7 #define MAPLE_32BIT (MAPLE_NODE_SLOTS > 31)
8 #include "shared.h"
9 #include <stdlib.h>
10 #include <time.h>
11 #include "linux/init.h"
12 
13 void maple_rcu_cb(struct rcu_head *head);
14 #define rcu_cb		maple_rcu_cb
15 
16 #define kfree_rcu(_struct, _memb)		\
17 do {                                            \
18     typeof(_struct) _p_struct = (_struct);      \
19                                                 \
20     call_rcu(&((_p_struct)->_memb), rcu_cb);    \
21 } while(0);
22 
23 
24 #endif /* __MAPLE_SHARED_H__ */
25