Module Name: src
Committed By: rillig
Date: Mon Jun 26 07:56:30 UTC 2023
Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: assert.h
ctl.h log.h ph.h ql.h qr.h rb.h rtree.h
src/external/bsd/jemalloc/dist/src: ctl.c
Log Message:
jemalloc: reduce CONSTCOND diff to upstream
Since 2021-01-31, lint no longer needs these comments.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
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
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/jemalloc/dist/src/ctl.c
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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h Mon Jun 26 07:56:29 2023
@@ -13,7 +13,7 @@
__FILE__, __LINE__, #e); \
abort(); \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#endif
#ifndef not_reached
@@ -25,7 +25,7 @@
abort(); \
} \
unreachable(); \
-} while (/*CONSTCOND*/0)
+} while (0)
#endif
#ifndef not_implemented
@@ -35,7 +35,7 @@
__FILE__, __LINE__); \
abort(); \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#endif
#ifndef assert_not_implemented
@@ -43,7 +43,7 @@
if (unlikely(config_debug && !(e))) { \
not_implemented(); \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#endif
/* Use to assert a particular configuration, e.g., cassert(config_debug). */
@@ -52,5 +52,5 @@
if (unlikely(!(c))) { \
not_reached(); \
} \
-} while (/*CONSTCOND*/0)
+} while (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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h Mon Jun 26 07:56:29 2023
@@ -109,7 +109,7 @@ void ctl_postfork_child(tsdn_t *tsdn);
name); \
abort(); \
} \
-} while (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h Mon Jun 26 07:56:29 2023
@@ -110,6 +110,6 @@ do { \
log_do_begin(log_var) \
log_impl_varargs((log_var).name, __VA_ARGS__); \
log_do_end(log_var) \
-} while (/*CONSTCOND*/0)
+} while (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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h Mon Jun 26 07:56:29 2023
@@ -16,7 +16,7 @@ struct { \
/* List functions. */
#define ql_new(a_head) do { \
(a_head)->qlh_first = NULL; \
-} while (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h Mon Jun 26 07:56:29 2023
@@ -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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h Mon Jun 26 07:56:29 2023
@@ -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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (0)
#define rbtn_red_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_red = true; \
-} while (/*CONSTCOND*/0)
+} while (0)
#define rbtn_black_set(a_type, a_field, a_node) do { \
(a_node)->a_field.rbn_red = false; \
-} while (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (0)
#endif
/* Tree initializer. */
#define rb_new(a_type, a_field, a_rbt) do { \
(a_rbt)->rbt_root = NULL; \
-} while (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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 (/*CONSTCOND*/0)
+} while (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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h:1.2 Mon Mar 4 20:06:50 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h Mon Jun 26 07:56:29 2023
@@ -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 (/*CONSTCOND*/0)
+} while (0)
/* Check the first cache entry. */
RTREE_CACHE_CHECK_L2(0);
/* Search the remaining cache elements. */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.4 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.5
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.4 Tue Mar 5 22:35:45 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h Mon Jun 26 07:56:29 2023
@@ -34,19 +34,19 @@ struct { \
(a_phn->a_field.phn_lchild)
#define phn_lchild_set(a_type, a_field, a_phn, a_lchild) do { \
a_phn->a_field.phn_lchild = a_lchild; \
-} while (/*CONSTCOND*/0)
+} while (0)
#define phn_next_get(a_type, a_field, a_phn) \
(a_phn->a_field.phn_next)
#define phn_prev_set(a_type, a_field, a_phn, a_prev) do { \
a_phn->a_field.phn_prev = a_prev; \
-} while (/*CONSTCOND*/0)
+} while (0)
#define phn_prev_get(a_type, a_field, a_phn) \
(a_phn->a_field.phn_prev)
#define phn_next_set(a_type, a_field, a_phn, a_next) do { \
a_phn->a_field.phn_next = a_next; \
-} while (/*CONSTCOND*/0)
+} while (0)
#define phn_merge_ordered(a_type, a_field, a_phn0, a_phn1, a_cmp) do { \
a_type *phn0child; \
@@ -62,7 +62,7 @@ struct { \
phn_prev_set(a_type, a_field, phn0child, a_phn1); \
} \
phn_lchild_set(a_type, a_field, a_phn0, a_phn1); \
-} while (/*CONSTCOND*/0)
+} while (0)
#define phn_merge(a_type, a_field, a_phn0, a_phn1, a_cmp, r_phn) do { \
if (a_phn0 == NULL) { \
@@ -78,7 +78,7 @@ struct { \
a_cmp); \
r_phn = a_phn1; \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define ph_merge_siblings(a_type, a_field, a_phn, a_cmp, r_phn) do { \
a_type *head = NULL; \
@@ -165,7 +165,7 @@ struct { \
} \
} \
r_phn = phn0; \
-} while (/*CONSTCOND*/0)
+} while (0)
#define ph_merge_aux(a_type, a_field, a_ph, a_cmp) do { \
a_type *_phn = phn_next_get(a_type, a_field, a_ph->ph_root); \
@@ -178,7 +178,7 @@ struct { \
phn_merge(a_type, a_field, a_ph->ph_root, _phn, a_cmp, \
a_ph->ph_root); \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define ph_merge_children(a_type, a_field, a_phn, a_cmp, r_phn) do { \
a_type *lchild = phn_lchild_get(a_type, a_field, a_phn); \
@@ -188,7 +188,7 @@ struct { \
ph_merge_siblings(a_type, a_field, lchild, a_cmp, \
r_phn); \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
/*
* The ph_proto() macro generates function prototypes that correspond to the
Index: src/external/bsd/jemalloc/dist/src/ctl.c
diff -u src/external/bsd/jemalloc/dist/src/ctl.c:1.2 src/external/bsd/jemalloc/dist/src/ctl.c:1.3
--- src/external/bsd/jemalloc/dist/src/ctl.c:1.2 Mon Mar 4 17:21:31 2019
+++ src/external/bsd/jemalloc/dist/src/ctl.c Mon Jun 26 07:56:30 2023
@@ -1299,14 +1299,14 @@ ctl_postfork_child(tsdn_t *tsdn) {
ret = EPERM; \
goto label_return; \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define WRITEONLY() do { \
if (oldp != NULL || oldlenp != NULL) { \
ret = EPERM; \
goto label_return; \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define READ_XOR_WRITE() do { \
if ((oldp != NULL && oldlenp != NULL) && (newp != NULL || \
@@ -1314,7 +1314,7 @@ ctl_postfork_child(tsdn_t *tsdn) {
ret = EPERM; \
goto label_return; \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define READ(v, t) do { \
if (oldp != NULL && oldlenp != NULL) { \
@@ -1327,7 +1327,7 @@ ctl_postfork_child(tsdn_t *tsdn) {
} \
*(t *)oldp = (v); \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define WRITE(v, t) do { \
if (newp != NULL) { \
@@ -1337,7 +1337,7 @@ ctl_postfork_child(tsdn_t *tsdn) {
} \
(v) = *(t *)newp; \
} \
-} while (/*CONSTCOND*/0)
+} while (0)
#define MIB_UNSIGNED(v, i) do { \
if (mib[i] > UINT_MAX) { \
@@ -1345,7 +1345,7 @@ ctl_postfork_child(tsdn_t *tsdn) {
goto label_return; \
} \
v = (unsigned)mib[i]; \
-} while (/*CONSTCOND*/0)
+} while (0)
/*
* There's a lot of code duplication in the following macros due to limitations