Lines Matching defs:dtv
93 * | max index | -1 max index i for which dtv[i] is alloced
95 * | generation | 0 void **dtv points here
106 * dtv[obj->tlsindex] works, when dtv[0] is the generation. The
124 * struct dtv {
129 #define DTV_GENERATION(dtv) ((size_t)((dtv)[0]))
130 #define DTV_MAX_INDEX(dtv) ((size_t)((dtv)[-1]))
131 #define SET_DTV_GENERATION(dtv, val) (dtv)[0] = (void *)(size_t)(val)
132 #define SET_DTV_MAX_INDEX(dtv, val) (dtv)[-1] = (void *)(size_t)(val)
152 void **dtv, **new_dtv;
157 dtv = tcb->tcb_dtv;
164 * DTV_MAX_INDEX(dtv)?
166 if (__predict_false(DTV_GENERATION(dtv) != _rtld_tls_dtv_generation)) {
167 size_t to_copy = DTV_MAX_INDEX(dtv);
173 new_dtv = xcalloc((2 + _rtld_tls_max_index) * sizeof(*dtv));
177 memcpy(new_dtv + 1, dtv + 1, to_copy * sizeof(*dtv));
178 xfree(dtv - 1); /* retreat back to DTV_MAX_INDEX */
179 dtv = tcb->tcb_dtv = new_dtv;
180 SET_DTV_MAX_INDEX(dtv, _rtld_tls_max_index);
181 SET_DTV_GENERATION(dtv, _rtld_tls_dtv_generation);
184 if (__predict_false(dtv[idx] == NULL))
185 dtv[idx] = _rtld_tls_module_allocate(tcb, idx);
189 return (uint8_t *)dtv[idx] + offset;
273 dbg(("%s: [lwp %d] tls dtv %p index %zu offset %zu",
511 void **dtv;
519 dtv = tcb->tcb_dtv;
528 if (__predict_true(idx <= DTV_MAX_INDEX(dtv) && dtv[idx] != NULL))
529 return (uint8_t *)dtv[idx] + offset;