Make eligible functions static

The codebase is already very disciplined in making any function which
can be `static`, but there are a few that appear to have slipped through
the cracks.
This commit is contained in:
Kevin Svetlitski
2023-05-08 12:37:18 -07:00
committed by Qi Wang
parent 6841110bd6
commit 70344a2d38
9 changed files with 16 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ static const uint64_t h_steps[SMOOTHSTEP_NSTEPS] = {
* Generate a new deadline that is uniformly random within the next epoch after
* the current one.
*/
void
static void
decay_deadline_init(decay_t *decay) {
nstime_copy(&decay->deadline, &decay->epoch);
nstime_add(&decay->deadline, &decay->interval);

View File

@@ -43,6 +43,8 @@ static edata_t *extent_try_coalesce(tsdn_t *tsdn, pac_t *pac, ehooks_t *ehooks,
static edata_t *extent_alloc_retained(tsdn_t *tsdn, pac_t *pac,
ehooks_t *ehooks, edata_t *expand_edata, size_t size, size_t alignment,
bool zero, bool *commit, bool guarded);
static bool extent_decommit_wrapper(tsdn_t *tsdn, ehooks_t *ehooks,
edata_t *edata, size_t offset, size_t length);
/******************************************************************************/
@@ -1118,7 +1120,7 @@ extent_commit_wrapper(tsdn_t *tsdn, ehooks_t *ehooks, edata_t *edata,
/* growing_retained */ false);
}
bool
static bool
extent_decommit_wrapper(tsdn_t *tsdn, ehooks_t *ehooks, edata_t *edata,
size_t offset, size_t length) {
witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),

View File

@@ -83,7 +83,7 @@ hpa_alloc_ps(tsdn_t *tsdn, hpa_central_t *central) {
CACHELINE);
}
hpdata_t *
static hpdata_t *
hpa_central_extract(tsdn_t *tsdn, hpa_central_t *central, size_t size,
bool *oom) {
/* Don't yet support big allocations; these should get filtered out. */