mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-27 02:57:21 +03:00
TSD: Make all state access happen through a function.
Shortly, tsd state will be atomic and have some complicated enough logic down the state-setting path that we should be aware of it.
This commit is contained in:
parent
e74a1a37c8
commit
982c10de35
5 changed files with 43 additions and 32 deletions
|
|
@ -98,11 +98,11 @@ thd_start_reincarnated(void *arg) {
|
|||
tsd_cleanup((void *)tsd);
|
||||
assert_ptr_null(*tsd_arenap_get_unsafe(tsd),
|
||||
"TSD arena should have been cleared.");
|
||||
assert_u_eq(tsd->state, tsd_state_purgatory,
|
||||
assert_u_eq(tsd_state_get(tsd), tsd_state_purgatory,
|
||||
"TSD state should be purgatory\n");
|
||||
|
||||
free(p);
|
||||
assert_u_eq(tsd->state, tsd_state_reincarnated,
|
||||
assert_u_eq(tsd_state_get(tsd), tsd_state_reincarnated,
|
||||
"TSD state should be reincarnated\n");
|
||||
p = mallocx(1, MALLOCX_TCACHE_NONE);
|
||||
assert_ptr_not_null(p, "Unexpected malloc() failure");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue