Module Name: src
Committed By: christos
Date: Mon Mar 4 20:06:50 UTC 2019
Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: assert.h
ctl.h log.h ql.h qr.h rb.h rtree.h
Log Message:
add constcond
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h Mon Mar 4 15:06:50 2019
@@ -13,7 +13,7 @@
__FILE__, __LINE__, #e); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif
#ifndef not_reached
@@ -25,7 +25,7 @@
abort(); \
} \
unreachable(); \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif
#ifndef not_implemented
@@ -35,7 +35,7 @@
__FILE__, __LINE__); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif
#ifndef assert_not_implemented
@@ -43,7 +43,7 @@
if (unlikely(config_debug && !(e))) { \
not_implemented(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif
/* Use to assert a particular configuration, e.g., cassert(config_debug). */
@@ -52,5 +52,5 @@
if (unlikely(!(c))) { \
not_reached(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h Mon Mar 4 15:06:50 2019
@@ -109,7 +109,7 @@ void ctl_postfork_child(tsdn_t *tsdn);
name); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define xmallctlnametomib(name, mibp, miblenp) do { \
if (je_mallctlnametomib(name, mibp, miblenp) != 0) { \
@@ -117,7 +117,7 @@ void ctl_postfork_child(tsdn_t *tsdn);
"xmallctlnametomib(\"%s\", ...)\n", name); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define xmallctlbymib(mib, miblen, oldp, oldlenp, newp, newlen) do { \
if (je_mallctlbymib(mib, miblen, oldp, oldlenp, newp, \
@@ -126,6 +126,6 @@ void ctl_postfork_child(tsdn_t *tsdn);
"<jemalloc>: Failure in xmallctlbymib()\n"); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif /* JEMALLOC_INTERNAL_CTL_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h Mon Mar 4 15:06:50 2019
@@ -110,6 +110,6 @@ do { \
log_do_begin(log_var) \
log_impl_varargs((log_var).name, __VA_ARGS__); \
log_do_end(log_var) \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif /* JEMALLOC_INTERNAL_LOG_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h Mon Mar 4 15:06:50 2019
@@ -16,7 +16,7 @@ struct { \
/* List functions. */
#define ql_new(a_head) do { \
(a_head)->qlh_first = NULL; \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_elm_new(a_elm, a_field) qr_new((a_elm), a_field)
@@ -39,7 +39,7 @@ struct { \
if (ql_first(a_head) == (a_qlelm)) { \
ql_first(a_head) = (a_elm); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_after_insert(a_qlelm, a_elm, a_field) \
qr_after_insert((a_qlelm), (a_elm), a_field)
@@ -49,14 +49,14 @@ struct { \
qr_before_insert(ql_first(a_head), (a_elm), a_field); \
} \
ql_first(a_head) = (a_elm); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_tail_insert(a_head, a_elm, a_field) do { \
if (ql_first(a_head) != NULL) { \
qr_before_insert(ql_first(a_head), (a_elm), a_field); \
} \
ql_first(a_head) = qr_next((a_elm), a_field); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_remove(a_head, a_elm, a_field) do { \
if (ql_first(a_head) == (a_elm)) { \
@@ -67,17 +67,17 @@ struct { \
} else { \
ql_first(a_head) = NULL; \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_head_remove(a_head, a_type, a_field) do { \
a_type *t = ql_first(a_head); \
ql_remove((a_head), t, a_field); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_tail_remove(a_head, a_type, a_field) do { \
a_type *t = ql_last(a_head, a_field); \
ql_remove((a_head), t, a_field); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define ql_foreach(a_var, a_head, a_field) \
qr_foreach((a_var), ql_first(a_head), a_field)
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h Mon Mar 4 15:06:50 2019
@@ -12,7 +12,7 @@ struct { \
#define qr_new(a_qr, a_field) do { \
(a_qr)->a_field.qre_next = (a_qr); \
(a_qr)->a_field.qre_prev = (a_qr); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define qr_next(a_qr, a_field) ((a_qr)->a_field.qre_next)
@@ -23,14 +23,14 @@ struct { \
(a_qr)->a_field.qre_next = (a_qrelm); \
(a_qr)->a_field.qre_prev->a_field.qre_next = (a_qr); \
(a_qrelm)->a_field.qre_prev = (a_qr); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define qr_after_insert(a_qrelm, a_qr, a_field) do { \
(a_qr)->a_field.qre_next = (a_qrelm)->a_field.qre_next; \
(a_qr)->a_field.qre_prev = (a_qrelm); \
(a_qr)->a_field.qre_next->a_field.qre_prev = (a_qr); \
(a_qrelm)->a_field.qre_next = (a_qr); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define qr_meld(a_qr_a, a_qr_b, a_type, a_field) do { \
a_type *t; \
@@ -39,7 +39,7 @@ struct { \
t = (a_qr_a)->a_field.qre_prev; \
(a_qr_a)->a_field.qre_prev = (a_qr_b)->a_field.qre_prev; \
(a_qr_b)->a_field.qre_prev = t; \
-} while (0)
+} while (/*CONSTCOND*/0)
/*
* qr_meld() and qr_split() are functionally equivalent, so there's no need to
@@ -55,7 +55,7 @@ struct { \
= (a_qr)->a_field.qre_prev; \
(a_qr)->a_field.qre_next = (a_qr); \
(a_qr)->a_field.qre_prev = (a_qr); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define qr_foreach(var, a_qr, a_field) \
for ((var) = (a_qr); \
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h Mon Mar 4 15:06:50 2019
@@ -53,7 +53,7 @@ struct { \
((a_node)->a_field.rbn_left)
#define rbtn_left_set(a_type, a_field, a_node, a_left) do { \
(a_node)->a_field.rbn_left = a_left; \
-} while (0)
+} while (/*CONSTCOND*/0)
#ifdef RB_COMPACT
/* Right accessors. */
@@ -63,7 +63,7 @@ struct { \
#define rbtn_right_set(a_type, a_field, a_node, a_right) do { \
(a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) a_right) \
| (((uintptr_t) (a_node)->a_field.rbn_right_red) & ((size_t)1))); \
-} while (0)
+} while (/*CONSTCOND*/0)
/* Color accessors. */
#define rbtn_red_get(a_type, a_field, a_node) \
@@ -73,15 +73,15 @@ struct { \
(a_node)->a_field.rbn_right_red = (a_type *) ((((intptr_t) \
(a_node)->a_field.rbn_right_red) & ((ssize_t)-2)) \
| ((ssize_t)a_red)); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_red_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) \
(a_node)->a_field.rbn_right_red) | ((size_t)1)); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_black_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_right_red = (a_type *) (((intptr_t) \
(a_node)->a_field.rbn_right_red) & ((ssize_t)-2)); \
-} while (0)
+} while (/*CONSTCOND*/0)
/* Node initializer. */
#define rbt_node_new(a_type, a_field, a_rbt, a_node) do { \
@@ -90,40 +90,40 @@ struct { \
rbtn_left_set(a_type, a_field, (a_node), NULL); \
rbtn_right_set(a_type, a_field, (a_node), NULL); \
rbtn_red_set(a_type, a_field, (a_node)); \
-} while (0)
+} while (/*CONSTCOND*/0)
#else
/* Right accessors. */
#define rbtn_right_get(a_type, a_field, a_node) \
((a_node)->a_field.rbn_right)
#define rbtn_right_set(a_type, a_field, a_node, a_right) do { \
(a_node)->a_field.rbn_right = a_right; \
-} while (0)
+} while (/*CONSTCOND*/0)
/* Color accessors. */
#define rbtn_red_get(a_type, a_field, a_node) \
((a_node)->a_field.rbn_red)
#define rbtn_color_set(a_type, a_field, a_node, a_red) do { \
(a_node)->a_field.rbn_red = (a_red); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_red_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_red = true; \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_black_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_red = false; \
-} while (0)
+} while (/*CONSTCOND*/0)
/* Node initializer. */
#define rbt_node_new(a_type, a_field, a_rbt, a_node) do { \
rbtn_left_set(a_type, a_field, (a_node), NULL); \
rbtn_right_set(a_type, a_field, (a_node), NULL); \
rbtn_red_set(a_type, a_field, (a_node)); \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif
/* Tree initializer. */
#define rb_new(a_type, a_field, a_rbt) do { \
(a_rbt)->rbt_root = NULL; \
-} while (0)
+} while (/*CONSTCOND*/0)
/* Internal utility macros. */
#define rbtn_first(a_type, a_field, a_rbt, a_root, r_node) do { \
@@ -134,7 +134,7 @@ struct { \
(r_node) = rbtn_left_get(a_type, a_field, (r_node))) { \
} \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_last(a_type, a_field, a_rbt, a_root, r_node) do { \
(r_node) = (a_root); \
@@ -143,21 +143,21 @@ struct { \
(r_node) = rbtn_right_get(a_type, a_field, (r_node))) { \
} \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_rotate_left(a_type, a_field, a_node, r_node) do { \
(r_node) = rbtn_right_get(a_type, a_field, (a_node)); \
rbtn_right_set(a_type, a_field, (a_node), \
rbtn_left_get(a_type, a_field, (r_node))); \
rbtn_left_set(a_type, a_field, (r_node), (a_node)); \
-} while (0)
+} while (/*CONSTCOND*/0)
#define rbtn_rotate_right(a_type, a_field, a_node, r_node) do { \
(r_node) = rbtn_left_get(a_type, a_field, (a_node)); \
rbtn_left_set(a_type, a_field, (a_node), \
rbtn_right_get(a_type, a_field, (r_node))); \
rbtn_right_set(a_type, a_field, (r_node), (a_node)); \
-} while (0)
+} while (/*CONSTCOND*/0)
/*
* The rb_proto() macro generates function prototypes that correspond to the
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h:1.1.1.1 Mon Mar 4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h Mon Mar 4 15:06:50 2019
@@ -369,7 +369,7 @@ rtree_leaf_elm_lookup(tsdn_t *tsdn, rtre
uintptr_t subkey = rtree_subkey(key, RTREE_HEIGHT-1); \
return &leaf[subkey]; \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
/* Check the first cache entry. */
RTREE_CACHE_CHECK_L2(0);
/* Search the remaining cache elements. */