Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/jemalloc/include/jemalloc Add noreturn for the ...



details:   https://anonhg.NetBSD.org/src/rev/08b872a90041
branches:  trunk
changeset: 449557:08b872a90041
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 10 19:32:56 2019 +0000

description:
Add noreturn for the benefit of clang

diffstat:

 external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h     |   4 ++--
 external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h   |   2 +-
 external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h   |   4 ++--
 external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h |   6 ++----
 external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h    |  10 +++++-----
 external/bsd/jemalloc/include/jemalloc/jemalloc.h                   |   2 ++
 6 files changed, 14 insertions(+), 14 deletions(-)

diffs (137 lines):

diff -r 8196155fccce -r 08b872a90041 external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h   Sun Mar 10 18:03:40 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h   Sun Mar 10 19:32:56 2019 +0000
@@ -56,8 +56,8 @@
     szind_t ind, bool zero);
 void *arena_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize,
     size_t alignment, bool zero, tcache_t *tcache);
-void arena_prof_promote(tsdn_t *tsdn, const void *ptr, size_t usize);
-void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache,
+JEMALLOC_NORETURN void arena_prof_promote(tsdn_t *tsdn, const void *ptr, size_t usize);
+JEMALLOC_NORETURN void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache,
     bool slow_path);
 void arena_dalloc_bin_junked_locked(tsdn_t *tsdn, arena_t *arena,
     extent_t *extent, void *ptr);
diff -r 8196155fccce -r 08b872a90041 external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h Sun Mar 10 18:03:40 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h Sun Mar 10 19:32:56 2019 +0000
@@ -32,7 +32,7 @@
        return prof_accum_add(tsdn, &arena->prof_accum, accumbytes);
 }
 
-static inline void
+static JEMALLOC_NORETURN inline void
 percpu_arena_update(tsd_t *tsd, unsigned cpu) {
        assert(have_percpu_arena);
        arena_t *oldarena = tsd_arena_get(tsd);
diff -r 8196155fccce -r 08b872a90041 external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h Sun Mar 10 18:03:40 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h Sun Mar 10 19:32:56 2019 +0000
@@ -27,7 +27,7 @@
        return (prof_tctx_t *)(uintptr_t)1U;
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 arena_prof_tctx_set(tsdn_t *tsdn, const void *ptr, UNUSED size_t usize,
     alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) {
        cassert(config_prof);
@@ -46,7 +46,7 @@
        }
 }
 
-static inline void
+static JEMALLOC_NORETURN inline void
 arena_prof_tctx_reset(tsdn_t *tsdn, const void *ptr, UNUSED prof_tctx_t *tctx) {
        cassert(config_prof);
        assert(ptr != NULL);
diff -r 8196155fccce -r 08b872a90041 external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h       Sun Mar 10 18:03:40 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h       Sun Mar 10 19:32:56 2019 +0000
@@ -36,8 +36,7 @@
        __atomic_thread_fence(atomic_enum_to_builtin(mo));
 }
 
-#define JEMALLOC_GENERATE_ATOMICS(type, short_type,                    \
-    /* unused */ lg_size)                                              \
+#define JEMALLOC_GENERATE_ATOMICS(type, short_type, lg_size)           \
 typedef struct {                                                       \
        type repr;                                                      \
 } atomic_##short_type##_t;                                             \
@@ -85,8 +84,7 @@
 }
 
 
-#define JEMALLOC_GENERATE_INT_ATOMICS(type, short_type,                        \
-    /* unused */ lg_size)                                              \
+#define JEMALLOC_GENERATE_INT_ATOMICS(type, short_type,        lg_size)        \
 JEMALLOC_GENERATE_ATOMICS(type, short_type, /* unused */ lg_size)      \
                                                                        \
 ATOMIC_INLINE type                                                     \
diff -r 8196155fccce -r 08b872a90041 external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h  Sun Mar 10 18:03:40 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h  Sun Mar 10 19:32:56 2019 +0000
@@ -44,7 +44,7 @@
        return arena_prof_tctx_get(tsdn, ptr, alloc_ctx);
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 prof_tctx_set(tsdn_t *tsdn, const void *ptr, size_t usize,
     alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) {
        cassert(config_prof);
@@ -53,7 +53,7 @@
        arena_prof_tctx_set(tsdn, ptr, usize, alloc_ctx, tctx);
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 prof_tctx_reset(tsdn_t *tsdn, const void *ptr, prof_tctx_t *tctx) {
        cassert(config_prof);
        assert(ptr != NULL);
@@ -118,7 +118,7 @@
        return ret;
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 prof_malloc(tsdn_t *tsdn, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx,
     prof_tctx_t *tctx) {
        cassert(config_prof);
@@ -133,7 +133,7 @@
        }
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
     bool _prof_active, bool updated, const void *old_ptr, size_t old_usize,
     prof_tctx_t *old_tctx) {
@@ -191,7 +191,7 @@
        }
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 prof_free(tsd_t *tsd, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx) {
        prof_tctx_t *tctx = prof_tctx_get(tsd_tsdn(tsd), ptr, alloc_ctx);
 
diff -r 8196155fccce -r 08b872a90041 external/bsd/jemalloc/include/jemalloc/jemalloc.h
--- a/external/bsd/jemalloc/include/jemalloc/jemalloc.h Sun Mar 10 18:03:40 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/jemalloc.h Sun Mar 10 19:32:56 2019 +0000
@@ -169,6 +169,7 @@
 #if defined(_MSC_VER)
 #  define JEMALLOC_ATTR(s)
 #  define JEMALLOC_ALIGNED(s) __declspec(align(s))
+#  define JEMALLOC_NORETURN
 #  define JEMALLOC_ALLOC_SIZE(s)
 #  define JEMALLOC_ALLOC_SIZE2(s1, s2)
 #  ifndef JEMALLOC_EXPORT
@@ -195,6 +196,7 @@
 #elif defined(JEMALLOC_HAVE_ATTR)
 #  define JEMALLOC_ATTR(s) __attribute__((s))
 #  define JEMALLOC_ALIGNED(s) JEMALLOC_ATTR(aligned(s))
+#  define JEMALLOC_NORETURN JEMALLOC_ATTR(__noreturn__)
 #  ifdef JEMALLOC_HAVE_ATTR_ALLOC_SIZE
 #    define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s))
 #    define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2))



Home | Main Index | Thread Index | Old Index