Replace spin_init() with SPIN_INITIALIZER.
This commit is contained in:
@@ -62,13 +62,12 @@ extent_dss_prec_set(dss_prec_t dss_prec) {
|
||||
static void *
|
||||
extent_dss_max_update(void *new_addr) {
|
||||
void *max_cur;
|
||||
spin_t spinner;
|
||||
|
||||
/*
|
||||
* Get the current end of the DSS as max_cur and assure that dss_max is
|
||||
* up to date.
|
||||
*/
|
||||
spin_init(&spinner);
|
||||
spin_t spinner = SPIN_INITIALIZER;
|
||||
while (true) {
|
||||
void *max_prev = atomic_read_p(&dss_max);
|
||||
|
||||
|
@@ -1153,10 +1153,8 @@ malloc_init_hard_needed(void) {
|
||||
}
|
||||
#ifdef JEMALLOC_THREADED_INIT
|
||||
if (malloc_initializer != NO_INITIALIZER && !IS_INITIALIZER) {
|
||||
spin_t spinner;
|
||||
|
||||
/* Busy-wait until the initializing thread completes. */
|
||||
spin_init(&spinner);
|
||||
spin_t spinner = SPIN_INITIALIZER;
|
||||
do {
|
||||
malloc_mutex_unlock(TSDN_NULL, &init_lock);
|
||||
spin_adaptive(&spinner);
|
||||
|
Reference in New Issue
Block a user