mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 16:13:38 +03:00
Replace spin_init() with SPIN_INITIALIZER.
This commit is contained in:
parent
650c070e10
commit
5f11830754
5 changed files with 4 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue