mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-07 22:37:16 +03:00
Keep TSD bootstrap reentrant until data init completes
This commit is contained in:
parent
95c2588191
commit
36f2017777
1 changed files with 3 additions and 1 deletions
|
|
@ -182,7 +182,9 @@ tsd_fetch_slow(tsd_t *tsd, bool minimal) {
|
|||
tsd_slow_update(tsd);
|
||||
/* Trigger cleanup handler registration. */
|
||||
tsd_set(tsd);
|
||||
tsd_pre_reentrancy_raw(tsd);
|
||||
tsd_data_init(tsd);
|
||||
tsd_post_reentrancy_raw(tsd);
|
||||
}
|
||||
} else {
|
||||
tsd_state_set(tsd, tsd_state_minimal_initialized);
|
||||
|
|
@ -210,9 +212,9 @@ tsd_fetch_slow(tsd_t *tsd, bool minimal) {
|
|||
/* Switch to fully initialized. */
|
||||
tsd_state_set(tsd, tsd_state_nominal);
|
||||
assert(*tsd_reentrancy_levelp_get(tsd) >= 1);
|
||||
(*tsd_reentrancy_levelp_get(tsd))--;
|
||||
tsd_slow_update(tsd);
|
||||
tsd_data_init(tsd);
|
||||
tsd_post_reentrancy_raw(tsd);
|
||||
} else {
|
||||
assert_tsd_data_cleanup_done(tsd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue