/external/curl/lib/ |
D | asyn-thread.c | 173 struct thread_sync_data tsd; member 178 return &(((struct thread_data *)conn->async.os_specific)->tsd); in conn_thread_sync_data() 181 #define CONN_THREAD_SYNC_DATA(conn) &(((conn)->async.os_specific)->tsd); 185 void destroy_thread_sync_data(struct thread_sync_data * tsd) in destroy_thread_sync_data() argument 187 if(tsd->mtx) { in destroy_thread_sync_data() 188 Curl_mutex_destroy(tsd->mtx); in destroy_thread_sync_data() 189 free(tsd->mtx); in destroy_thread_sync_data() 192 free(tsd->hostname); in destroy_thread_sync_data() 194 if(tsd->res) in destroy_thread_sync_data() 195 Curl_freeaddrinfo(tsd->res); in destroy_thread_sync_data() [all …]
|
/external/jemalloc/src/ |
D | jemalloc.c | 476 arena_bind(tsd_t *tsd, unsigned ind, bool internal) in arena_bind() argument 480 if (!tsd_nominal(tsd)) in arena_bind() 483 arena = arena_get(tsd_tsdn(tsd), ind, false); in arena_bind() 487 tsd_iarena_set(tsd, arena); in arena_bind() 489 tsd_arena_set(tsd, arena); in arena_bind() 493 arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind) in arena_migrate() argument 497 oldarena = arena_get(tsd_tsdn(tsd), oldind, false); in arena_migrate() 498 newarena = arena_get(tsd_tsdn(tsd), newind, false); in arena_migrate() 501 tsd_arena_set(tsd, newarena); in arena_migrate() 505 arena_unbind(tsd_t *tsd, unsigned ind, bool internal) in arena_unbind() argument [all …]
|
D | tcache.c | 37 tcache_event_hard(tsd_t *tsd, tcache_t *tcache) in tcache_event_hard() argument 48 tcache_bin_flush_small(tsd, tcache, tbin, binind, in tcache_event_hard() 52 tcache_bin_flush_large(tsd, tbin, binind, tbin->ncached in tcache_event_hard() 92 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, in tcache_bin_flush_small() argument 103 arena = arena_choose(tsd, NULL); in tcache_bin_flush_small() 113 if (arena_prof_accum(tsd_tsdn(tsd), arena, in tcache_bin_flush_small() 115 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_small() 119 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in tcache_bin_flush_small() 137 arena_dalloc_bin_junked_locked(tsd_tsdn(tsd), in tcache_bin_flush_small() 150 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in tcache_bin_flush_small() [all …]
|
D | prof.c | 125 static void prof_tctx_destroy(tsd_t *tsd, prof_tctx_t *tctx); 128 static void prof_tdata_destroy(tsd_t *tsd, prof_tdata_t *tdata, 197 prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated) in rb_gen() 210 tdata = prof_tdata_get(tsd, true); in rb_gen() 216 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen() 218 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) in rb_gen() 219 prof_tctx_destroy(tsd, tctx); in rb_gen() 221 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen() 244 prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) in prof_free_sampled_object() argument 247 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in prof_free_sampled_object() [all …]
|
D | quarantine.c | 15 static quarantine_t *quarantine_grow(tsd_t *tsd, quarantine_t *quarantine); 43 quarantine_alloc_hook_work(tsd_t *tsd) in quarantine_alloc_hook_work() argument 47 if (!tsd_nominal(tsd)) in quarantine_alloc_hook_work() 50 quarantine = quarantine_init(tsd_tsdn(tsd), LG_MAXOBJS_INIT); in quarantine_alloc_hook_work() 55 if (tsd_quarantine_get(tsd) == NULL) in quarantine_alloc_hook_work() 56 tsd_quarantine_set(tsd, quarantine); in quarantine_alloc_hook_work() 58 idalloctm(tsd_tsdn(tsd), quarantine, NULL, true, true); in quarantine_alloc_hook_work() 62 quarantine_grow(tsd_t *tsd, quarantine_t *quarantine) in quarantine_grow() argument 66 ret = quarantine_init(tsd_tsdn(tsd), quarantine->lg_maxobjs + 1); in quarantine_grow() 68 quarantine_drain_one(tsd_tsdn(tsd), quarantine); in quarantine_grow() [all …]
|
D | tsd.c | 73 tsd_t *tsd = (tsd_t *)arg; in tsd_cleanup() local 75 switch (tsd->state) { in tsd_cleanup() 81 n##_cleanup(tsd); in tsd_cleanup() 84 tsd->state = tsd_state_purgatory; in tsd_cleanup() 85 tsd_set(tsd); in tsd_cleanup() 101 tsd->state = tsd_state_purgatory; in tsd_cleanup() 102 tsd_set(tsd); in tsd_cleanup() 112 tsd_t *tsd; in malloc_tsd_boot0() local 117 tsd = tsd_fetch(); in malloc_tsd_boot0() 118 *tsd_arenas_tdata_bypassp_get(tsd) = true; in malloc_tsd_boot0() [all …]
|
D | witness.c | 97 witnesses_cleanup(tsd_t *tsd) in witnesses_cleanup() argument 100 witness_assert_lockless(tsd_tsdn(tsd)); in witnesses_cleanup() 106 witness_fork_cleanup(tsd_t *tsd) in witness_fork_cleanup() argument 113 witness_prefork(tsd_t *tsd) in witness_prefork() argument 116 tsd_witness_fork_set(tsd, true); in witness_prefork() 120 witness_postfork_parent(tsd_t *tsd) in witness_postfork_parent() argument 123 tsd_witness_fork_set(tsd, false); in witness_postfork_parent() 127 witness_postfork_child(tsd_t *tsd) in witness_postfork_child() argument 132 witnesses = tsd_witnessesp_get(tsd); in witness_postfork_child() 135 tsd_witness_fork_set(tsd, false); in witness_postfork_child()
|
D | ctl.c | 45 static int n##_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, \ 915 ctl_byname(tsd_t *tsd, const char *name, void *oldp, size_t *oldlenp, in ctl_byname() argument 924 if (!ctl_initialized && ctl_init(tsd_tsdn(tsd))) { in ctl_byname() 930 ret = ctl_lookup(tsd_tsdn(tsd), name, nodes, mib, &depth); in ctl_byname() 936 ret = node->ctl(tsd, mib, depth, oldp, oldlenp, newp, newlen); in ctl_byname() 962 ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, in ctl_bymib() argument 969 if (!ctl_initialized && ctl_init(tsd_tsdn(tsd))) { in ctl_bymib() 991 node = inode->index(tsd_tsdn(tsd), mib, miblen, mib[i]); in ctl_bymib() 1001 ret = node->ctl(tsd, mib, miblen, oldp, oldlenp, newp, newlen); in ctl_bymib() 1098 n##_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, \ [all …]
|
D | ckh.c | 43 static bool ckh_grow(tsd_t *tsd, ckh_t *ckh); 44 static void ckh_shrink(tsd_t *tsd, ckh_t *ckh); 248 ckh_grow(tsd_t *tsd, ckh_t *ckh) in ckh_grow() argument 274 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, in ckh_grow() 275 true, NULL, true, arena_ichoose(tsd, NULL)); in ckh_grow() 287 idalloctm(tsd_tsdn(tsd), tab, NULL, true, true); in ckh_grow() 292 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, true, true); in ckh_grow() 303 ckh_shrink(tsd_t *tsd, ckh_t *ckh) in ckh_shrink() argument 318 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, true, NULL, in ckh_shrink() 319 true, arena_ichoose(tsd, NULL)); in ckh_shrink() [all …]
|
/external/jemalloc/include/jemalloc/internal/ |
D | tcache.h | 146 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); 149 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, 151 void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind, 155 tcache_t *tcache_get_hard(tsd_t *tsd); 157 void tcache_cleanup(tsd_t *tsd); 158 void tcache_enabled_cleanup(tsd_t *tsd); 160 bool tcaches_create(tsd_t *tsd, unsigned *r_ind); 161 void tcaches_flush(tsd_t *tsd, unsigned ind); 162 void tcaches_destroy(tsd_t *tsd, unsigned ind); 173 void tcache_event(tsd_t *tsd, tcache_t *tcache); [all …]
|
D | prof.h | 283 void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); 286 void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx); 289 prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); 300 bool prof_mdump(tsd_t *tsd, const char *filename); 302 prof_tdata_t *prof_tdata_init(tsd_t *tsd); 303 prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); 304 void prof_reset(tsd_t *tsd, size_t lg_sample); 305 void prof_tdata_cleanup(tsd_t *tsd); 308 const char *prof_thread_name_get(tsd_t *tsd); 309 int prof_thread_name_set(tsd_t *tsd, const char *thread_name); [all …]
|
D | witness.h | 101 void witnesses_cleanup(tsd_t *tsd); 102 void witness_fork_cleanup(tsd_t *tsd); 103 void witness_prefork(tsd_t *tsd); 104 void witness_postfork_parent(tsd_t *tsd); 105 void witness_postfork_child(tsd_t *tsd); 112 bool witness_owner(tsd_t *tsd, const witness_t *witness); 122 witness_owner(tsd_t *tsd, const witness_t *witness) in witness_owner() argument 127 witnesses = tsd_witnessesp_get(tsd); in witness_owner() 139 tsd_t *tsd; in witness_assert_owner() local 146 tsd = tsdn_tsd(tsdn); in witness_assert_owner() [all …]
|
D | jemalloc_internal.h | 490 arena_tdata_t *arena_tdata_get_hard(tsd_t *tsd, unsigned ind); 491 arena_t *arena_choose_hard(tsd_t *tsd, bool internal); 492 void arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind); 493 void thread_allocated_cleanup(tsd_t *tsd); 494 void thread_deallocated_cleanup(tsd_t *tsd); 495 void iarena_cleanup(tsd_t *tsd); 496 void arena_cleanup(tsd_t *tsd); 497 void arenas_tdata_cleanup(tsd_t *tsd); 498 void narenas_tdata_cleanup(tsd_t *tsd); 499 void arenas_tdata_bypass_cleanup(tsd_t *tsd); [all …]
|
D | quarantine.h | 32 void quarantine_alloc_hook_work(tsd_t *tsd); 33 void quarantine(tsd_t *tsd, void *ptr); 34 void quarantine_cleanup(tsd_t *tsd); 48 tsd_t *tsd; in quarantine_alloc_hook() local 52 tsd = tsd_fetch(); in quarantine_alloc_hook() 53 if (tsd_quarantine_get(tsd) == NULL) in quarantine_alloc_hook() 54 quarantine_alloc_hook_work(tsd); in quarantine_alloc_hook()
|
D | tsd.h | 638 tsd_t tsd; member 672 tsdn_t *tsd_tsdn(tsd_t *tsd); 673 bool tsd_nominal(tsd_t *tsd); 675 t *tsd_##n##p_get(tsd_t *tsd); \ 676 t tsd_##n##_get(tsd_t *tsd); \ 677 void tsd_##n##_set(tsd_t *tsd, t n); 692 tsd_t *tsd = tsd_get(init); in tsd_fetch_impl() local 694 if (!init && tsd_get_allocates() && tsd == NULL) in tsd_fetch_impl() 696 assert(tsd != NULL); in tsd_fetch_impl() 698 if (unlikely(tsd->state != tsd_state_nominal)) { in tsd_fetch_impl() [all …]
|
D | jemalloc_internal.h.in | 382 #include "jemalloc/internal/tsd.h" 434 #include "jemalloc/internal/tsd.h" 490 arena_tdata_t *arena_tdata_get_hard(tsd_t *tsd, unsigned ind); 491 arena_t *arena_choose_hard(tsd_t *tsd, bool internal); 492 void arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind); 493 void thread_allocated_cleanup(tsd_t *tsd); 494 void thread_deallocated_cleanup(tsd_t *tsd); 495 void iarena_cleanup(tsd_t *tsd); 496 void arena_cleanup(tsd_t *tsd); 497 void arenas_tdata_cleanup(tsd_t *tsd); [all …]
|
D | ckh.h | 67 bool ckh_new(tsd_t *tsd, ckh_t *ckh, size_t minitems, ckh_hash_t *hash, 69 void ckh_delete(tsd_t *tsd, ckh_t *ckh); 72 bool ckh_insert(tsd_t *tsd, ckh_t *ckh, const void *key, const void *data); 73 bool ckh_remove(tsd_t *tsd, ckh_t *ckh, const void *searchkey, void **key,
|
/external/jemalloc/test/unit/ |
D | ckh.c | 5 tsd_t *tsd; in TEST_BEGIN() local 8 tsd = tsd_fetch(); in TEST_BEGIN() 10 assert_false(ckh_new(tsd, &ckh, 2, ckh_string_hash, in TEST_BEGIN() 12 ckh_delete(tsd, &ckh); in TEST_BEGIN() 14 assert_false(ckh_new(tsd, &ckh, 3, ckh_pointer_hash, in TEST_BEGIN() 16 ckh_delete(tsd, &ckh); in TEST_BEGIN() 22 tsd_t *tsd; in TEST_BEGIN() local 33 tsd = tsd_fetch(); in TEST_BEGIN() 35 assert_false(ckh_new(tsd, &ckh, 2, ckh_string_hash, in TEST_BEGIN() 43 ckh_insert(tsd, &ckh, strs[i], strs[i]); in TEST_BEGIN() [all …]
|
/external/toybox/toys/pending/ |
D | syslogd.c | 408 struct unsocks *tsd; in syslogd_main() local 420 tsd = xzalloc(sizeof(struct unsocks)); in syslogd_main() 422 tsd->path = (toys.optflags & FLAG_p) ? TT.unix_socket : "/dev/log"; // DEFLOGSOCK in syslogd_main() 423 TT.lsocks = tsd; in syslogd_main() 428 tsd = xzalloc(sizeof(struct unsocks)); in syslogd_main() 429 tsd->path = temp; in syslogd_main() 430 tsd->next = TT.lsocks; in syslogd_main() 431 TT.lsocks = tsd; in syslogd_main() 440 for (tsd = TT.lsocks; tsd; tsd = tsd->next) { in syslogd_main() 441 tsd->sdu.sun_family = AF_UNIX; in syslogd_main() [all …]
|
/external/compiler-rt/lib/asan/ |
D | asan_posix.cc | 99 void AsanTSDInit(void (*destructor)(void *tsd)) { in AsanTSDInit() argument 110 void AsanTSDSet(void *tsd) { in AsanTSDSet() argument 112 pthread_setspecific(tsd_key, tsd); in AsanTSDSet() 115 void PlatformTSDDtor(void *tsd) { in PlatformTSDDtor() argument 116 AsanThreadContext *context = (AsanThreadContext*)tsd; in PlatformTSDDtor() 119 CHECK_EQ(0, pthread_setspecific(tsd_key, tsd)); in PlatformTSDDtor() 122 AsanThread::TSDDtor(tsd); in PlatformTSDDtor()
|
D | asan_win.cc | 179 void AsanTSDInit(void (*destructor)(void *tsd)) { in AsanTSDInit() argument 189 void AsanTSDSet(void *tsd) { in AsanTSDSet() argument 191 fake_tsd = tsd; in AsanTSDSet() 194 void PlatformTSDDtor(void *tsd) { in PlatformTSDDtor() argument 195 AsanThread::TSDDtor(tsd); in PlatformTSDDtor()
|
D | asan_internal.h | 92 void AsanTSDInit(void (*destructor)(void *tsd)); 94 void AsanTSDSet(void *tsd); 95 void PlatformTSDDtor(void *tsd);
|
/external/mesa3d/src/gallium/auxiliary/os/ |
D | os_thread.h | 308 pipe_tsd_init(pipe_tsd *tsd) in pipe_tsd_init() argument 310 if (tss_create(&tsd->key, NULL/*free*/) != 0) { in pipe_tsd_init() 313 tsd->initMagic = PIPE_TSD_INIT_MAGIC; in pipe_tsd_init() 317 pipe_tsd_get(pipe_tsd *tsd) in pipe_tsd_get() argument 319 if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { in pipe_tsd_get() 320 pipe_tsd_init(tsd); in pipe_tsd_get() 322 return tss_get(tsd->key); in pipe_tsd_get() 326 pipe_tsd_set(pipe_tsd *tsd, void *value) in pipe_tsd_set() argument 328 if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { in pipe_tsd_set() 329 pipe_tsd_init(tsd); in pipe_tsd_set() [all …]
|
/external/libxml2/ |
D | threads.c | 666 xmlGlobalState *tsd = xmlNewGlobalState(); in xmlGetGlobalState() local 667 if (tsd == NULL) in xmlGetGlobalState() 670 pthread_setspecific(globalkey, tsd); in xmlGetGlobalState() 671 return (tsd); in xmlGetGlobalState() 693 xmlGlobalState *tsd = xmlNewGlobalState(); in xmlGetGlobalState() 695 if (tsd == NULL) in xmlGetGlobalState() 702 xmlFreeGlobalState(tsd); in xmlGetGlobalState() 705 p->memory = tsd; in xmlGetGlobalState() 710 TlsSetValue(globalkey, tsd); in xmlGetGlobalState() 724 return (tsd); in xmlGetGlobalState() [all …]
|
/external/compiler-rt/lib/msan/ |
D | msan_linux.cc | 179 void MsanTSDInit(void (*destructor)(void *tsd)) { in MsanTSDInit() argument 200 void MsanTSDDtor(void *tsd) { in MsanTSDDtor() argument 201 MsanThread *t = (MsanThread*)tsd; in MsanTSDDtor() 204 CHECK_EQ(0, pthread_setspecific(tsd_key, tsd)); in MsanTSDDtor() 210 MsanThread::TSDDtor(tsd); in MsanTSDDtor()
|