Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/jemalloc/dist/src jemalloc: reduce CONSTCOND di...



details:   https://anonhg.NetBSD.org/src/rev/424156e346c4
branches:  trunk
changeset: 376626:424156e346c4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Jun 26 07:56:29 2023 +0000

description:
jemalloc: reduce CONSTCOND diff to upstream

Since 2021-01-31, lint no longer needs these comments.

diffstat:

 external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h |  10 +-
 external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h    |   6 +-
 external/bsd/jemalloc/dist/include/jemalloc/internal/log.h    |   2 +-
 external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h     |  16 ++--
 external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h     |  14 ++--
 external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h     |  10 +-
 external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h     |  32 +++++-----
 external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.h  |   2 +-
 external/bsd/jemalloc/dist/src/ctl.c                          |  12 ++--
 9 files changed, 52 insertions(+), 52 deletions(-)

diffs (truncated from 453 to 300 lines):

diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h     Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h     Mon Jun 26 07:56:29 2023 +0000
@@ -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
diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h        Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h        Mon Jun 26 07:56:29 2023 +0000
@@ -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 */
diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/log.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h        Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h        Mon Jun 26 07:56:29 2023 +0000
@@ -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 */
diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h Mon Jun 26 07:56:29 2023 +0000
@@ -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
diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h Mon Jun 26 07:56:29 2023 +0000
@@ -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)
diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h Mon Jun 26 07:56:29 2023 +0000
@@ -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);                                            \
diff -r b170cc6dc0f7 -r 424156e346c4 external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h Mon Jun 26 07:51:57 2023 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h Mon Jun 26 07:56:29 2023 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index