From 0237870c60104b418ce78b86752bf44b3b478b97 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Mon, 10 Apr 2017 17:11:33 -0700 Subject: Header refactoring: break out ql.h dependencies --- include/jemalloc/internal/arena_structs_b.h | 3 +++ include/jemalloc/internal/ctl_structs.h | 2 ++ include/jemalloc/internal/extent_inlines.h | 2 ++ include/jemalloc/internal/extent_structs.h | 1 + include/jemalloc/internal/jemalloc_internal.h.in | 2 -- include/jemalloc/internal/tcache_structs.h | 2 ++ include/jemalloc/internal/tsd_structs.h | 2 ++ include/jemalloc/internal/tsd_types.h | 2 ++ include/jemalloc/internal/witness_inlines.h | 2 ++ include/jemalloc/internal/witness_types.h | 2 ++ test/unit/ql.c | 2 ++ 11 files changed, 20 insertions(+), 2 deletions(-) diff --git a/include/jemalloc/internal/arena_structs_b.h b/include/jemalloc/internal/arena_structs_b.h index b6ba3db..935cd16 100644 --- a/include/jemalloc/internal/arena_structs_b.h +++ b/include/jemalloc/internal/arena_structs_b.h @@ -1,5 +1,8 @@ #ifndef JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H #define JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H + +#include "jemalloc/internal/ql.h" + /* * Read-only information associated with each element of arena_t's bins array * is stored separately, partly to reduce memory usage (only one copy, rather diff --git a/include/jemalloc/internal/ctl_structs.h b/include/jemalloc/internal/ctl_structs.h index af0f78b..2b48a68 100644 --- a/include/jemalloc/internal/ctl_structs.h +++ b/include/jemalloc/internal/ctl_structs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_CTL_STRUCTS_H #define JEMALLOC_INTERNAL_CTL_STRUCTS_H +#include "jemalloc/internal/ql.h" + struct ctl_node_s { bool named; }; diff --git a/include/jemalloc/internal/extent_inlines.h b/include/jemalloc/internal/extent_inlines.h index f1b9477..6fc0101 100644 --- a/include/jemalloc/internal/extent_inlines.h +++ b/include/jemalloc/internal/extent_inlines.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_EXTENT_INLINES_H #define JEMALLOC_INTERNAL_EXTENT_INLINES_H +#include "jemalloc/internal/ql.h" + #ifndef JEMALLOC_ENABLE_INLINE arena_t *extent_arena_get(const extent_t *extent); szind_t extent_szind_get_maybe_invalid(const extent_t *extent); diff --git a/include/jemalloc/internal/extent_structs.h b/include/jemalloc/internal/extent_structs.h index 87107a8..2f81fa1 100644 --- a/include/jemalloc/internal/extent_structs.h +++ b/include/jemalloc/internal/extent_structs.h @@ -2,6 +2,7 @@ #define JEMALLOC_INTERNAL_EXTENT_STRUCTS_H #include "jemalloc/internal/ph.h" +#include "jemalloc/internal/ql.h" typedef enum { extent_state_active = 0, diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in index fdeda7b..58240e3 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -180,8 +180,6 @@ static const bool have_percpu_arena = #include #endif -#include "jemalloc/internal/ql.h" - /* * jemalloc can conceptually be broken into components (arena, tcache, etc.), * but there are circular dependencies that cannot be broken without diff --git a/include/jemalloc/internal/tcache_structs.h b/include/jemalloc/internal/tcache_structs.h index 4e10160..c43e59b 100644 --- a/include/jemalloc/internal/tcache_structs.h +++ b/include/jemalloc/internal/tcache_structs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_TCACHE_STRUCTS_H #define JEMALLOC_INTERNAL_TCACHE_STRUCTS_H +#include "jemalloc/internal/ql.h" + /* * Read-only information associated with each element of tcache_t's tbins array * is stored separately, mainly to reduce memory usage. diff --git a/include/jemalloc/internal/tsd_structs.h b/include/jemalloc/internal/tsd_structs.h index 7f34d1b..ac74152 100644 --- a/include/jemalloc/internal/tsd_structs.h +++ b/include/jemalloc/internal/tsd_structs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_TSD_STRUCTS_H #define JEMALLOC_INTERNAL_TSD_STRUCTS_H +#include "jemalloc/internal/ql.h" + #if (!defined(JEMALLOC_MALLOC_THREAD_CLEANUP) && !defined(JEMALLOC_TLS) && \ !defined(_WIN32)) struct tsd_init_block_s { diff --git a/include/jemalloc/internal/tsd_types.h b/include/jemalloc/internal/tsd_types.h index 4d5fef5..27afd1d 100644 --- a/include/jemalloc/internal/tsd_types.h +++ b/include/jemalloc/internal/tsd_types.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_TSD_TYPES_H #define JEMALLOC_INTERNAL_TSD_TYPES_H +#include "jemalloc/internal/ql.h" + /* Maximum number of malloc_tsd users with cleanup functions. */ #define MALLOC_TSD_CLEANUPS_MAX 2 diff --git a/include/jemalloc/internal/witness_inlines.h b/include/jemalloc/internal/witness_inlines.h index 51f3f6e..c5027f1 100644 --- a/include/jemalloc/internal/witness_inlines.h +++ b/include/jemalloc/internal/witness_inlines.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_WITNESS_INLINES_H #define JEMALLOC_INTERNAL_WITNESS_INLINES_H +#include "jemalloc/internal/ql.h" + #ifndef JEMALLOC_ENABLE_INLINE bool witness_owner(tsd_t *tsd, const witness_t *witness); void witness_assert_owner(tsdn_t *tsdn, const witness_t *witness); diff --git a/include/jemalloc/internal/witness_types.h b/include/jemalloc/internal/witness_types.h index 95fc296..d43a363 100644 --- a/include/jemalloc/internal/witness_types.h +++ b/include/jemalloc/internal/witness_types.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_WITNESS_TYPES_H #define JEMALLOC_INTERNAL_WITNESS_TYPES_H +#include "jemalloc/internal/ql.h" + typedef struct witness_s witness_t; typedef unsigned witness_rank_t; typedef ql_head(witness_t) witness_list_t; diff --git a/test/unit/ql.c b/test/unit/ql.c index ae6481f..b76c24c 100644 --- a/test/unit/ql.c +++ b/test/unit/ql.c @@ -1,5 +1,7 @@ #include "test/jemalloc_test.h" +#include "jemalloc/internal/ql.h" + /* Number of ring entries, in [2..26]. */ #define NENTRIES 9 -- cgit v0.12