Pass tsd to tcache_flush().

This commit is contained in:
Qi Wang 2017-06-15 15:16:18 -07:00 committed by Qi Wang
parent 84f6c2cae0
commit ae93fb08e2
3 changed files with 3 additions and 4 deletions

View File

@ -48,7 +48,7 @@ void tcache_arena_associate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena);
void tcache_prefork(tsdn_t *tsdn);
void tcache_postfork_parent(tsdn_t *tsdn);
void tcache_postfork_child(tsdn_t *tsdn);
void tcache_flush(void);
void tcache_flush(tsd_t *tsd);
bool tsd_tcache_data_init(tsd_t *tsd);
bool tsd_tcache_enabled_data_init(tsd_t *tsd);

View File

@ -1696,7 +1696,7 @@ thread_tcache_flush_ctl(tsd_t *tsd, const size_t *mib, size_t miblen,
READONLY();
WRITEONLY();
tcache_flush();
tcache_flush(tsd);
ret = 0;
label_return:

View File

@ -474,8 +474,7 @@ tcache_flush_cache(tsd_t *tsd, tcache_t *tcache) {
}
void
tcache_flush(void) {
tsd_t *tsd = tsd_fetch();
tcache_flush(tsd_t *tsd) {
assert(tcache_available(tsd));
tcache_flush_cache(tsd, tsd_tcachep_get(tsd));
}