Header refactoring: unify nstime.h and move it out of the catch-all
This commit is contained in:
parent
7ebc83894f
commit
418d96a86c
@ -2,6 +2,7 @@
|
||||
#define JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H
|
||||
|
||||
#include "jemalloc/internal/atomic.h"
|
||||
#include "jemalloc/internal/nstime.h"
|
||||
#include "jemalloc/internal/ql.h"
|
||||
|
||||
/*
|
||||
|
@ -40,7 +40,6 @@
|
||||
/* TYPES */
|
||||
/******************************************************************************/
|
||||
|
||||
#include "jemalloc/internal/nstime_types.h"
|
||||
#include "jemalloc/internal/spin_types.h"
|
||||
#include "jemalloc/internal/prng_types.h"
|
||||
#include "jemalloc/internal/ticker_types.h"
|
||||
@ -66,7 +65,6 @@
|
||||
/* STRUCTS */
|
||||
/******************************************************************************/
|
||||
|
||||
#include "jemalloc/internal/nstime_structs.h"
|
||||
#include "jemalloc/internal/spin_structs.h"
|
||||
#include "jemalloc/internal/ticker_structs.h"
|
||||
#include "jemalloc/internal/ckh_structs.h"
|
||||
@ -90,7 +88,6 @@
|
||||
/******************************************************************************/
|
||||
|
||||
#include "jemalloc/internal/jemalloc_internal_externs.h"
|
||||
#include "jemalloc/internal/nstime_externs.h"
|
||||
#include "jemalloc/internal/ckh_externs.h"
|
||||
#include "jemalloc/internal/stats_externs.h"
|
||||
#include "jemalloc/internal/ctl_externs.h"
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef JEMALLOC_INTERNAL_MUTEX_INLINES_H
|
||||
#define JEMALLOC_INTERNAL_MUTEX_INLINES_H
|
||||
|
||||
#include "jemalloc/internal/nstime.h"
|
||||
|
||||
void malloc_mutex_lock_slow(malloc_mutex_t *mutex);
|
||||
|
||||
#ifndef JEMALLOC_ENABLE_INLINE
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define JEMALLOC_INTERNAL_MUTEX_STRUCTS_H
|
||||
|
||||
#include "jemalloc/internal/atomic.h"
|
||||
#include "jemalloc/internal/nstime.h"
|
||||
|
||||
struct mutex_prof_data_s {
|
||||
/*
|
||||
|
@ -1,7 +1,15 @@
|
||||
#ifndef JEMALLOC_INTERNAL_NSTIME_EXTERNS_H
|
||||
#define JEMALLOC_INTERNAL_NSTIME_EXTERNS_H
|
||||
#ifndef JEMALLOC_INTERNAL_NSTIME_H
|
||||
#define JEMALLOC_INTERNAL_NSTIME_H
|
||||
|
||||
void nstime_init(nstime_t *time, uint64_t ns);
|
||||
/* Maximum supported number of seconds (~584 years). */
|
||||
#define NSTIME_SEC_MAX KQU(18446744072)
|
||||
#define NSTIME_ZERO_INITIALIZER {0}
|
||||
|
||||
typedef struct {
|
||||
uint64_t ns;
|
||||
} nstime_t;
|
||||
|
||||
void nstime_init(nstime_t *time, uint64_t ns);
|
||||
void nstime_init2(nstime_t *time, uint64_t sec, uint64_t nsec);
|
||||
uint64_t nstime_ns(const nstime_t *time);
|
||||
uint64_t nstime_sec(const nstime_t *time);
|
||||
@ -24,4 +32,5 @@ bool nstime_monotonic(void);
|
||||
bool nstime_update(nstime_t *time);
|
||||
#endif
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_NSTIME_EXTERNS_H */
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_NSTIME_H */
|
@ -1,8 +0,0 @@
|
||||
#ifndef JEMALLOC_INTERNAL_NSTIME_STRUCTS_H
|
||||
#define JEMALLOC_INTERNAL_NSTIME_STRUCTS_H
|
||||
|
||||
struct nstime_s {
|
||||
uint64_t ns;
|
||||
};
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_NSTIME_STRUCTS_H */
|
@ -1,11 +0,0 @@
|
||||
#ifndef JEMALLOC_INTERNAL_NSTIME_TYPES_H
|
||||
#define JEMALLOC_INTERNAL_NSTIME_TYPES_H
|
||||
|
||||
typedef struct nstime_s nstime_t;
|
||||
|
||||
/* Maximum supported number of seconds (~584 years). */
|
||||
#define NSTIME_SEC_MAX KQU(18446744072)
|
||||
|
||||
#define NSTIME_ZERO_INITIALIZER {0}
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_NSTIME_TYPES_H */
|
@ -3,6 +3,7 @@
|
||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||
|
||||
#include "jemalloc/internal/assert.h"
|
||||
#include "jemalloc/internal/nstime.h"
|
||||
#include "jemalloc/internal/util.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "jemalloc/internal/jemalloc_preamble.h"
|
||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||
|
||||
#include "jemalloc/internal/nstime.h"
|
||||
|
||||
#include "jemalloc/internal/assert.h"
|
||||
|
||||
#define BILLION UINT64_C(1000000000)
|
||||
|
@ -74,12 +74,10 @@ static const bool config_debug =
|
||||
/* Hermetic headers. */
|
||||
# include "jemalloc/internal/assert.h"
|
||||
# include "jemalloc/internal/malloc_io.h"
|
||||
# include "jemalloc/internal/nstime.h"
|
||||
# include "jemalloc/internal/util.h"
|
||||
|
||||
/* Non-hermetic headers. */
|
||||
# include "jemalloc/internal/nstime_types.h"
|
||||
# include "jemalloc/internal/nstime_structs.h"
|
||||
# include "jemalloc/internal/nstime_externs.h"
|
||||
# include "jemalloc/internal/qr.h"
|
||||
# include "jemalloc/internal/ql.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user