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/include/jemalloc/internal add con...
details: https://anonhg.NetBSD.org/src/rev/997e5938c15c
branches: trunk
changeset: 839747:997e5938c15c
user: christos <christos%NetBSD.org@localhost>
date: Mon Mar 04 20:06:50 2019 +0000
description:
add constcond
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/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 +-
7 files changed, 38 insertions(+), 38 deletions(-)
diffs (truncated from 326 to 300 lines):
diff -r 231c3fd5f22e -r 997e5938c15c external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h Mon Mar 04 20:06:31 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h Mon Mar 04 20:06:50 2019 +0000
@@ -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
diff -r 231c3fd5f22e -r 997e5938c15c external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h Mon Mar 04 20:06:31 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h Mon Mar 04 20:06:50 2019 +0000
@@ -109,7 +109,7 @@
name); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#define xmallctlnametomib(name, mibp, miblenp) do { \
if (je_mallctlnametomib(name, mibp, miblenp) != 0) { \
@@ -117,7 +117,7 @@
"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 @@
"<jemalloc>: Failure in xmallctlbymib()\n"); \
abort(); \
} \
-} while (0)
+} while (/*CONSTCOND*/0)
#endif /* JEMALLOC_INTERNAL_CTL_H */
diff -r 231c3fd5f22e -r 997e5938c15c external/bsd/jemalloc/dist/include/jemalloc/internal/log.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h Mon Mar 04 20:06:31 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h Mon Mar 04 20:06:50 2019 +0000
@@ -110,6 +110,6 @@
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 */
diff -r 231c3fd5f22e -r 997e5938c15c external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h Mon Mar 04 20:06:31 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h Mon Mar 04 20:06:50 2019 +0000
@@ -16,7 +16,7 @@
/* 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 @@
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 @@
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 @@
} 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)
diff -r 231c3fd5f22e -r 997e5938c15c external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h Mon Mar 04 20:06:31 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h Mon Mar 04 20:06:50 2019 +0000
@@ -12,7 +12,7 @@
#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 @@
(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 @@
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 @@
= (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); \
diff -r 231c3fd5f22e -r 997e5938c15c external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h Mon Mar 04 20:06:31 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h Mon Mar 04 20:06:50 2019 +0000
@@ -53,7 +53,7 @@
((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 @@
#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 @@
(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 @@
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 @@
(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 @@
(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))); \
Home |
Main Index |
Thread Index |
Old Index