From 2f00ce4da7b1c360a9b1129ebcdb087da562e2d4 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Mon, 10 Apr 2017 16:54:25 -0700 Subject: [PATCH] Header refactoring: break out ph.h dependencies --- include/jemalloc/internal/extent_externs.h | 2 ++ include/jemalloc/internal/extent_structs.h | 2 ++ include/jemalloc/internal/jemalloc_internal.h.in | 1 - src/extent.c | 2 ++ test/unit/ph.c | 2 ++ 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/jemalloc/internal/extent_externs.h b/include/jemalloc/internal/extent_externs.h index 6c153d04..3fe4a0ad 100644 --- a/include/jemalloc/internal/extent_externs.h +++ b/include/jemalloc/internal/extent_externs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_EXTENT_EXTERNS_H #define JEMALLOC_INTERNAL_EXTENT_EXTERNS_H +#include "jemalloc/internal/ph.h" + extern rtree_t extents_rtree; extern const extent_hooks_t extent_hooks_default; diff --git a/include/jemalloc/internal/extent_structs.h b/include/jemalloc/internal/extent_structs.h index 5d41bb81..87107a88 100644 --- a/include/jemalloc/internal/extent_structs.h +++ b/include/jemalloc/internal/extent_structs.h @@ -1,6 +1,8 @@ #ifndef JEMALLOC_INTERNAL_EXTENT_STRUCTS_H #define JEMALLOC_INTERNAL_EXTENT_STRUCTS_H +#include "jemalloc/internal/ph.h" + typedef enum { extent_state_active = 0, extent_state_dirty = 1, diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in index 73c5d3a5..7756b8f0 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -180,7 +180,6 @@ static const bool have_percpu_arena = #include #endif -#include "jemalloc/internal/ph.h" #ifndef __PGI #define RB_COMPACT #endif diff --git a/src/extent.c b/src/extent.c index e080773b..b6c3f4b4 100644 --- a/src/extent.c +++ b/src/extent.c @@ -1,6 +1,8 @@ #define JEMALLOC_EXTENT_C_ #include "jemalloc/internal/jemalloc_internal.h" +#include "jemalloc/internal/ph.h" + /******************************************************************************/ /* Data. */ diff --git a/test/unit/ph.c b/test/unit/ph.c index 01df340c..88bf56f8 100644 --- a/test/unit/ph.c +++ b/test/unit/ph.c @@ -1,5 +1,7 @@ #include "test/jemalloc_test.h" +#include "jemalloc/internal/ph.h" + typedef struct node_s node_t; struct node_s {