aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2019-09-28 09:50:01 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2019-09-28 09:50:01 +0000
commita5adff0eebb383985cd41fa117ee9381cbed7f8e (patch)
treea7b8eb0d5eed5f2ee70f7087e221f1f532afdce0 /sys
parent160afacf5bb0feb6a2b113c2cc25c1c7bdee27cd (diff)
downloadsrc-a5adff0eebb383985cd41fa117ee9381cbed7f8e.tar.gz
src-a5adff0eebb383985cd41fa117ee9381cbed7f8e.zip
Rename ARB_REBALANCE(3) to ARB_REINSERT(3) to match tree(3),
and document it. MFC after: 2 weeks Sponsored by: Klara Inc, Netflix
Notes
Notes: svn path=/head/; revision=352839
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/arb.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/sys/arb.h b/sys/sys/arb.h
index 71b81b645d04..e5f0a450cb3a 100644
--- a/sys/sys/arb.h
+++ b/sys/sys/arb.h
@@ -253,7 +253,7 @@ struct { \
ARB_PROTOTYPE_PREV(name, type, attr); \
ARB_PROTOTYPE_CMINMAX(name, type, attr); \
ARB_PROTOTYPE_MINMAX(name, type, attr); \
- ARB_PROTOTYPE_REBALANCE(name, type, attr);
+ ARB_PROTOTYPE_REINSERT(name, type, attr);
#define ARB_PROTOTYPE_INSERT_COLOR(name, type, attr) \
attr void name##_ARB_INSERT_COLOR(struct name *, struct type *)
#define ARB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \
@@ -289,8 +289,8 @@ struct { \
attr const struct type *name##_ARB_CMINMAX(const struct name *, int)
#define ARB_PROTOTYPE_MINMAX(name, type, attr) \
attr struct type *name##_ARB_MINMAX(const struct name *, int)
-#define ARB_PROTOTYPE_REBALANCE(name, type, attr) \
- attr struct type *name##_ARB_REBALANCE(struct name *, struct type *)
+#define ARB_PROTOTYPE_REINSERT(name, type, attr) \
+ attr struct type *name##_ARB_REINSERT(struct name *, struct type *)
#define ARB_GENERATE(name, type, field, cmp) \
ARB_GENERATE_INTERNAL(name, type, field, cmp,)
@@ -309,7 +309,7 @@ struct { \
ARB_GENERATE_PREV(name, type, field, attr) \
ARB_GENERATE_CMINMAX(name, type, field, attr) \
ARB_GENERATE_MINMAX(name, type, field, attr) \
- ARB_GENERATE_REBALANCE(name, type, field, cmp, attr)
+ ARB_GENERATE_REINSERT(name, type, field, cmp, attr)
#define ARB_GENERATE_INSERT_COLOR(name, type, field, attr) \
attr void \
@@ -695,9 +695,9 @@ attr struct type * \
name##_ARB_MINMAX(const struct name *head, int val) \
{ return (__DECONST(struct type *, name##_ARB_CMINMAX(head, val))); }
-#define ARB_GENERATE_REBALANCE(name, type, field, cmp, attr) \
+#define ARB_GENERATE_REINSERT(name, type, field, cmp, attr) \
attr struct type * \
-name##_ARB_REBALANCE(struct name *head, struct type *elm) \
+name##_ARB_REINSERT(struct name *head, struct type *elm) \
{ \
struct type *cmpelm; \
if (((cmpelm = ARB_PREV(name, head, elm)) != NULL && \
@@ -731,7 +731,7 @@ name##_ARB_REBALANCE(struct name *head, struct type *elm) \
name##_ARB_CMINMAX(x, ARB_INF) : ARB_CNODE(x, ARB_MAXIDX(x)))
#define ARB_MAX(name, x) (ARB_MAXIDX(x) == ARB_NULLIDX ? \
name##_ARB_MINMAX(x, ARB_INF) : ARB_NODE(x, ARB_MAXIDX(x)))
-#define ARB_REBALANCE(name, x, y) name##_ARB_REBALANCE(x, y)
+#define ARB_REINSERT(name, x, y) name##_ARB_REINSERT(x, y)
#define ARB_FOREACH(x, name, head) \
for ((x) = ARB_MIN(name, head); \