From aea91b8c338594daed753c94f33ff32d4b23fdc9 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Wed, 17 Feb 2021 16:23:24 -0800 Subject: [PATCH] Clean up some minor data structure inconsistencies Namely, unify the include guard styling with the majority of the project, and do flat_bitmap -> fb, to match its naming convention. --- Makefile.in | 2 +- include/jemalloc/internal/eset.h | 2 +- include/jemalloc/internal/{flat_bitmap.h => fb.h} | 0 include/jemalloc/internal/hpdata.h | 2 +- include/jemalloc/internal/ph.h | 8 ++++---- include/jemalloc/internal/rb.h | 8 ++++---- src/hpa.c | 2 +- src/psset.c | 2 +- test/unit/{flat_bitmap.c => fb.c} | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) rename include/jemalloc/internal/{flat_bitmap.h => fb.h} (100%) rename test/unit/{flat_bitmap.c => fb.c} (99%) diff --git a/Makefile.in b/Makefile.in index c00ad0f3..130fa1ee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -215,7 +215,7 @@ TESTS_UNIT := \ $(srcroot)test/unit/edata_cache.c \ $(srcroot)test/unit/emitter.c \ $(srcroot)test/unit/extent_quantize.c \ - ${srcroot}test/unit/flat_bitmap.c \ + ${srcroot}test/unit/fb.c \ $(srcroot)test/unit/fork.c \ ${srcroot}test/unit/fxp.c \ $(srcroot)test/unit/hash.c \ diff --git a/include/jemalloc/internal/eset.h b/include/jemalloc/internal/eset.h index 7b53ecd8..ff5e57d1 100644 --- a/include/jemalloc/internal/eset.h +++ b/include/jemalloc/internal/eset.h @@ -2,7 +2,7 @@ #define JEMALLOC_INTERNAL_ESET_H #include "jemalloc/internal/atomic.h" -#include "jemalloc/internal/flat_bitmap.h" +#include "jemalloc/internal/fb.h" #include "jemalloc/internal/edata.h" #include "jemalloc/internal/mutex.h" diff --git a/include/jemalloc/internal/flat_bitmap.h b/include/jemalloc/internal/fb.h similarity index 100% rename from include/jemalloc/internal/flat_bitmap.h rename to include/jemalloc/internal/fb.h diff --git a/include/jemalloc/internal/hpdata.h b/include/jemalloc/internal/hpdata.h index 245116b9..4ff2e575 100644 --- a/include/jemalloc/internal/hpdata.h +++ b/include/jemalloc/internal/hpdata.h @@ -1,7 +1,7 @@ #ifndef JEMALLOC_INTERNAL_HPDATA_H #define JEMALLOC_INTERNAL_HPDATA_H -#include "jemalloc/internal/flat_bitmap.h" +#include "jemalloc/internal/fb.h" #include "jemalloc/internal/ph.h" #include "jemalloc/internal/ql.h" #include "jemalloc/internal/typed_list.h" diff --git a/include/jemalloc/internal/ph.h b/include/jemalloc/internal/ph.h index 84d6778a..63aeac91 100644 --- a/include/jemalloc/internal/ph.h +++ b/include/jemalloc/internal/ph.h @@ -1,3 +1,6 @@ +#ifndef JEMALLOC_INTERNAL_PH_H +#define JEMALLOC_INTERNAL_PH_H + /* * A Pairing Heap implementation. * @@ -12,9 +15,6 @@ ******************************************************************************* */ -#ifndef PH_H_ -#define PH_H_ - /* Node structure. */ #define phn(a_type) \ struct { \ @@ -388,4 +388,4 @@ a_prefix##remove(a_ph_type *ph, a_type *phn) { \ } \ } -#endif /* PH_H_ */ +#endif /* JEMALLOC_INTERNAL_PH_H */ diff --git a/include/jemalloc/internal/rb.h b/include/jemalloc/internal/rb.h index 47fa5ca9..dfc705aa 100644 --- a/include/jemalloc/internal/rb.h +++ b/include/jemalloc/internal/rb.h @@ -1,3 +1,6 @@ +#ifndef JEMALLOC_INTERNAL_RB_H +#define JEMALLOC_INTERNAL_RB_H + /*- ******************************************************************************* * @@ -19,9 +22,6 @@ ******************************************************************************* */ -#ifndef RB_H_ -#define RB_H_ - #ifndef __PGI #define RB_COMPACT #endif @@ -1003,4 +1003,4 @@ a_prefix##destroy(a_rbt_type *rbtree, void (*cb)(a_type *, void *), \ rbtree->rbt_root = NULL; \ } -#endif /* RB_H_ */ +#endif /* JEMALLOC_INTERNAL_RB_H */ diff --git a/src/hpa.c b/src/hpa.c index a234e6c5..22cf0072 100644 --- a/src/hpa.c +++ b/src/hpa.c @@ -3,7 +3,7 @@ #include "jemalloc/internal/hpa.h" -#include "jemalloc/internal/flat_bitmap.h" +#include "jemalloc/internal/fb.h" #include "jemalloc/internal/witness.h" #define HPA_EDEN_SIZE (128 * HUGEPAGE) diff --git a/src/psset.c b/src/psset.c index c4053efc..5978202a 100644 --- a/src/psset.c +++ b/src/psset.c @@ -3,7 +3,7 @@ #include "jemalloc/internal/psset.h" -#include "jemalloc/internal/flat_bitmap.h" +#include "jemalloc/internal/fb.h" void psset_init(psset_t *psset) { diff --git a/test/unit/flat_bitmap.c b/test/unit/fb.c similarity index 99% rename from test/unit/flat_bitmap.c rename to test/unit/fb.c index 6b0bcc34..d5126f6b 100644 --- a/test/unit/flat_bitmap.c +++ b/test/unit/fb.c @@ -1,6 +1,6 @@ #include "test/jemalloc_test.h" -#include "jemalloc/internal/flat_bitmap.h" +#include "jemalloc/internal/fb.h" #include "test/nbits.h" static void