|
@@ -29,9 +29,9 @@
|
|
|
|
|
|
#ifndef _SYS_TREE_H_
|
|
#ifndef _SYS_TREE_H_
|
|
#define _SYS_TREE_H_
|
|
#define _SYS_TREE_H_
|
|
-
|
|
|
|
-#ifndef NULL
|
|
|
|
-#define NULL RT_NULL
|
|
|
|
|
|
+
|
|
|
|
+#ifndef NULL
|
|
|
|
+#define NULL RT_NULL
|
|
#endif
|
|
#endif
|
|
// #include <sys/cdefs.h>
|
|
// #include <sys/cdefs.h>
|
|
|
|
|
|
@@ -126,7 +126,7 @@ struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
|
|
struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
|
|
struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
|
|
\
|
|
\
|
|
/* Finds the node with the same key as elm */ \
|
|
/* Finds the node with the same key as elm */ \
|
|
-static __inline struct type * \
|
|
|
|
|
|
+rt_inline struct type * \
|
|
name##_SPLAY_FIND(struct name *head, struct type *elm) \
|
|
name##_SPLAY_FIND(struct name *head, struct type *elm) \
|
|
{ \
|
|
{ \
|
|
if (SPLAY_EMPTY(head)) \
|
|
if (SPLAY_EMPTY(head)) \
|
|
@@ -137,7 +137,7 @@ name##_SPLAY_FIND(struct name *head, struct type *elm) \
|
|
return (NULL); \
|
|
return (NULL); \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
-static __inline struct type * \
|
|
|
|
|
|
+rt_inline struct type * \
|
|
name##_SPLAY_NEXT(struct name *head, struct type *elm) \
|
|
name##_SPLAY_NEXT(struct name *head, struct type *elm) \
|
|
{ \
|
|
{ \
|
|
name##_SPLAY(head, elm); \
|
|
name##_SPLAY(head, elm); \
|
|
@@ -151,7 +151,7 @@ name##_SPLAY_NEXT(struct name *head, struct type *elm) \
|
|
return (elm); \
|
|
return (elm); \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
-static __inline struct type * \
|
|
|
|
|
|
+rt_inline struct type * \
|
|
name##_SPLAY_MIN_MAX(struct name *head, int val) \
|
|
name##_SPLAY_MIN_MAX(struct name *head, int val) \
|
|
{ \
|
|
{ \
|
|
name##_SPLAY_MINMAX(head, val); \
|
|
name##_SPLAY_MINMAX(head, val); \
|