Lines Matching defs:dtv
96 * | max index | -1 max index i for which dtv[i] is alloced
98 * | generation | 0 void **dtv points here
109 * dtv[obj->tlsindex] works, when dtv[0] is the generation. The
127 * struct dtv {
132 #define DTV_GENERATION(dtv) ((size_t)((dtv)[0]))
133 #define DTV_MAX_INDEX(dtv) ((size_t)((dtv)[-1]))
134 #define SET_DTV_GENERATION(dtv, val) (dtv)[0] = (void *)(size_t)(val)
135 #define SET_DTV_MAX_INDEX(dtv, val) (dtv)[-1] = (void *)(size_t)(val)
155 void **dtv, **new_dtv;
160 dtv = tcb->tcb_dtv;
167 * DTV_MAX_INDEX(dtv)?
169 if (__predict_false(DTV_GENERATION(dtv) != _rtld_tls_dtv_generation)) {
170 size_t to_copy = DTV_MAX_INDEX(dtv);
176 new_dtv = xcalloc((2 + _rtld_tls_max_index) * sizeof(*dtv));
180 memcpy(new_dtv + 1, dtv + 1, to_copy * sizeof(*dtv));
181 xfree(dtv - 1); /* retreat back to DTV_MAX_INDEX */
182 dtv = tcb->tcb_dtv = new_dtv;
183 SET_DTV_MAX_INDEX(dtv, _rtld_tls_max_index);
184 SET_DTV_GENERATION(dtv, _rtld_tls_dtv_generation);
187 if (__predict_false(dtv[idx] == NULL))
188 dtv[idx] = _rtld_tls_module_allocate(tcb, idx);
192 return (uint8_t *)dtv[idx] + offset;
276 dbg(("%s: [lwp %d] tls dtv %p-%p index %zu "
520 void **dtv;
528 dtv = tcb->tcb_dtv;
537 if (__predict_true(idx <= DTV_MAX_INDEX(dtv) && dtv[idx] != NULL))
538 return (uint8_t *)dtv[idx] + offset;