summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/jemalloc/internal/arena_structs_b.h1
-rw-r--r--include/jemalloc/internal/atomic.h4
-rw-r--r--include/jemalloc/internal/extent_structs.h1
-rw-r--r--include/jemalloc/internal/jemalloc_internal_externs.h2
-rw-r--r--include/jemalloc/internal/jemalloc_internal_includes.h1
-rw-r--r--include/jemalloc/internal/jemalloc_internal_inlines_a.h2
-rw-r--r--include/jemalloc/internal/mutex_structs.h2
-rw-r--r--include/jemalloc/internal/prng_inlines.h2
-rw-r--r--include/jemalloc/internal/rtree_structs.h2
-rw-r--r--include/jemalloc/internal/stats_structs.h2
-rw-r--r--src/jemalloc.c2
11 files changed, 20 insertions, 1 deletions
diff --git a/include/jemalloc/internal/arena_structs_b.h b/include/jemalloc/internal/arena_structs_b.h
index 935cd16..1f4fb6b 100644
--- a/include/jemalloc/internal/arena_structs_b.h
+++ b/include/jemalloc/internal/arena_structs_b.h
@@ -1,6 +1,7 @@
#ifndef JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H
#define JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H
+#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/ql.h"
/*
diff --git a/include/jemalloc/internal/atomic.h b/include/jemalloc/internal/atomic.h
index adadb1a..1bfae7d 100644
--- a/include/jemalloc/internal/atomic.h
+++ b/include/jemalloc/internal/atomic.h
@@ -3,6 +3,8 @@
#define ATOMIC_INLINE static inline
+CPP_PROLOGUE
+
#if defined(JEMALLOC_GCC_ATOMIC_ATOMICS)
# include "jemalloc/internal/atomic_gcc_atomic.h"
#elif defined(JEMALLOC_GCC_SYNC_ATOMICS)
@@ -74,4 +76,6 @@ JEMALLOC_GENERATE_INT_ATOMICS(uint64_t, u64, 3)
#undef ATOMIC_INLINE
+CPP_EPILOGUE
+
#endif /* JEMALLOC_INTERNAL_ATOMIC_H */
diff --git a/include/jemalloc/internal/extent_structs.h b/include/jemalloc/internal/extent_structs.h
index 2f81fa1..3d3d418 100644
--- a/include/jemalloc/internal/extent_structs.h
+++ b/include/jemalloc/internal/extent_structs.h
@@ -1,6 +1,7 @@
#ifndef JEMALLOC_INTERNAL_EXTENT_STRUCTS_H
#define JEMALLOC_INTERNAL_EXTENT_STRUCTS_H
+#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/ph.h"
#include "jemalloc/internal/ql.h"
diff --git a/include/jemalloc/internal/jemalloc_internal_externs.h b/include/jemalloc/internal/jemalloc_internal_externs.h
index 7ac39be..56d39d4 100644
--- a/include/jemalloc/internal/jemalloc_internal_externs.h
+++ b/include/jemalloc/internal/jemalloc_internal_externs.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_EXTERNS_H
#define JEMALLOC_INTERNAL_EXTERNS_H
+#include "jemalloc/internal/atomic.h"
+
extern bool opt_abort;
extern const char *opt_junk;
extern bool opt_junk_alloc;
diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h
index 4503513..53374f9 100644
--- a/include/jemalloc/internal/jemalloc_internal_includes.h
+++ b/include/jemalloc/internal/jemalloc_internal_includes.h
@@ -43,7 +43,6 @@ CPP_PROLOGUE
/******************************************************************************/
#include "jemalloc/internal/assert.h"
-#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/bit_util.h"
#include "jemalloc/internal/malloc_io.h"
#include "jemalloc/internal/util.h"
diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_a.h b/include/jemalloc/internal/jemalloc_internal_inlines_a.h
index 256329a..822b4d7 100644
--- a/include/jemalloc/internal/jemalloc_internal_inlines_a.h
+++ b/include/jemalloc/internal/jemalloc_internal_inlines_a.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_INLINES_A_H
#define JEMALLOC_INTERNAL_INLINES_A_H
+#include "jemalloc/internal/atomic.h"
+
#ifndef JEMALLOC_ENABLE_INLINE
pszind_t psz2ind(size_t psz);
size_t pind2sz_compute(pszind_t pind);
diff --git a/include/jemalloc/internal/mutex_structs.h b/include/jemalloc/internal/mutex_structs.h
index ff090b2..7b7085d 100644
--- a/include/jemalloc/internal/mutex_structs.h
+++ b/include/jemalloc/internal/mutex_structs.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_MUTEX_STRUCTS_H
#define JEMALLOC_INTERNAL_MUTEX_STRUCTS_H
+#include "jemalloc/internal/atomic.h"
+
struct mutex_prof_data_s {
/*
* Counters touched on the slow path, i.e. when there is lock
diff --git a/include/jemalloc/internal/prng_inlines.h b/include/jemalloc/internal/prng_inlines.h
index 3f06ccd..7026d52 100644
--- a/include/jemalloc/internal/prng_inlines.h
+++ b/include/jemalloc/internal/prng_inlines.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_PRNG_INLINES_H
#define JEMALLOC_INTERNAL_PRNG_INLINES_H
+#include "jemalloc/internal/atomic.h"
+
#ifndef JEMALLOC_ENABLE_INLINE
uint32_t prng_state_next_u32(uint32_t state);
uint64_t prng_state_next_u64(uint64_t state);
diff --git a/include/jemalloc/internal/rtree_structs.h b/include/jemalloc/internal/rtree_structs.h
index 123248a..175a013 100644
--- a/include/jemalloc/internal/rtree_structs.h
+++ b/include/jemalloc/internal/rtree_structs.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_RTREE_STRUCTS_H
#define JEMALLOC_INTERNAL_RTREE_STRUCTS_H
+#include "jemalloc/internal/atomic.h"
+
struct rtree_node_elm_s {
atomic_p_t child; /* (rtree_{node,leaf}_elm_t *) */
};
diff --git a/include/jemalloc/internal/stats_structs.h b/include/jemalloc/internal/stats_structs.h
index 75a4a78..dc994b5 100644
--- a/include/jemalloc/internal/stats_structs.h
+++ b/include/jemalloc/internal/stats_structs.h
@@ -1,6 +1,8 @@
#ifndef JEMALLOC_INTERNAL_STATS_STRUCTS_H
#define JEMALLOC_INTERNAL_STATS_STRUCTS_H
+#include "jemalloc/internal/atomic.h"
+
#ifdef JEMALLOC_ATOMIC_U64
typedef atomic_u64_t arena_stats_u64_t;
#else
diff --git a/src/jemalloc.c b/src/jemalloc.c
index 27f9711..77ee857 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -2,6 +2,8 @@
#include "jemalloc/internal/jemalloc_preamble.h"
#include "jemalloc/internal/jemalloc_internal_includes.h"
+#include "jemalloc/internal/atomic.h"
+
/******************************************************************************/
/* Data. */