Lines Matching refs:tlsp

91 	TLS_modinfo *tlsp;  in __tls_static_mods()  local
130 for (max_modid = 0, tlspp = tlslist; (tlsp = *tlspp) != NULL; tlspp++) { in __tls_static_mods()
131 ASSERT(tlsp->tm_flags & TM_FLG_STATICTLS); in __tls_static_mods()
132 ASSERT(tlsp->tm_stattlsoffset > 0); in __tls_static_mods()
133 ASSERT(tlsp->tm_stattlsoffset <= statictlssize); in __tls_static_mods()
134 ASSERT((tlsp->tm_stattlsoffset & (ALIGN - 1)) == 0); in __tls_static_mods()
135 ASSERT(tlsp->tm_filesz <= tlsp->tm_memsz); in __tls_static_mods()
136 ASSERT(tlsp->tm_memsz <= tlsp->tm_stattlsoffset); in __tls_static_mods()
137 if (tlsp->tm_filesz) in __tls_static_mods()
138 (void) memcpy(data_end-tlsp->tm_stattlsoffset, in __tls_static_mods()
139 tlsp->tm_tlsblock, tlsp->tm_filesz); in __tls_static_mods()
140 if (max_modid < tlsp->tm_modid) in __tls_static_mods()
141 max_modid = tlsp->tm_modid; in __tls_static_mods()
147 for (tlspp = tlslist; (tlsp = *tlspp) != NULL; tlspp++) in __tls_static_mods()
148 (void) memcpy(&modinfo[tlsp->tm_modid], in __tls_static_mods()
149 tlsp, sizeof (*tlsp)); in __tls_static_mods()
166 __tls_mod_add(TLS_modinfo *tlsp) in __tls_mod_add() argument
169 ulong_t moduleid = tlsp->tm_modid; in __tls_mod_add()
173 ASSERT(!(tlsp->tm_flags & TM_FLG_STATICTLS)); in __tls_mod_add()
174 ASSERT(tlsp->tm_filesz <= tlsp->tm_memsz); in __tls_mod_add()
176 (void) memcpy(&modinfo[moduleid], tlsp, sizeof (*tlsp)); in __tls_mod_add()
184 __tls_mod_remove(TLS_modinfo *tlsp) in __tls_mod_remove() argument
187 ulong_t moduleid = tlsp->tm_modid; in __tls_mod_remove()
220 TLS_modinfo *tlsp; in slow_tls_get_addr() local
249 tlsp = (TLS_modinfo *)tlsm->tls_modinfo.tls_data + moduleid; in slow_tls_get_addr()
250 if (tlsp->tm_memsz == 0) { /* dlclose()d module? */ in slow_tls_get_addr()
252 } else if (tlsp->tm_flags & TM_FLG_STATICTLS) { in slow_tls_get_addr()
254 base = (caddr_t)self - tlsp->tm_stattlsoffset; in slow_tls_get_addr()
259 base = lmalloc(tlsp->tm_memsz); in slow_tls_get_addr()
260 if (tlsp->tm_filesz != 0) in slow_tls_get_addr()
261 (void) memcpy(base, tlsp->tm_tlsblock, in slow_tls_get_addr()
262 tlsp->tm_filesz); in slow_tls_get_addr()
264 tlsent->tls_size = tlsp->tm_memsz; in slow_tls_get_addr()
266 arraycnt = tlsp->tm_tlsinitarraycnt; in slow_tls_get_addr()
267 initarray = tlsp->tm_tlsinitarray; in slow_tls_get_addr()
321 TLS_modinfo *tlsp; in tls_setup() local
342 tlsp = (TLS_modinfo *)tlsm->tls_modinfo.tls_data + moduleid; in tls_setup()
347 if (tlsp->tm_tlsinitarraycnt != 0 && in tls_setup()
348 (tlsp->tm_flags & TM_FLG_STATICTLS)) { in tls_setup()
349 ulong_t arraycnt = tlsp->tm_tlsinitarraycnt; in tls_setup()
350 void (**initarray)(void) = tlsp->tm_tlsinitarray; in tls_setup()
377 TLS_modinfo *tlsp; in tls_exit() local
396 tlsp = (TLS_modinfo *)tlsm->tls_modinfo.tls_data + moduleid; in tls_exit()
402 if (tlsp->tm_tlsfiniarraycnt != 0 && in tls_exit()
403 ((tlsp->tm_flags & TM_FLG_STATICTLS) || in tls_exit()
407 ulong_t arraycnt = tlsp->tm_tlsfiniarraycnt; in tls_exit()
408 void (**finiarray)(void) = tlsp->tm_tlsfiniarray; in tls_exit()