mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-27 04:41:02 +08:00
4c533566c2
* elf/dl-close.c (_dl_close): Check for it. * elf/dl-reloc.c (CHECK_STATIC_TLS): Likewise. (_dl_allocate_static_tls): Likewise. * elf/dl-tls.c (_dl_allocate_tls_init): Likewise. (__tls_get_addr): Protect from race conditions in setting l_tls_offset to it. * elf/tst-tls16.c: New file. * elf/tst-tlsmod16a.c: New file. * elf/tst-tlsmod16b.c: New file. * elf/Makefile: Add rules to build and run tst-tls16.
14 lines
227 B
C
14 lines
227 B
C
#include <tls.h>
|
|
|
|
#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
|
extern __thread int tlsvar __attribute__((tls_model("initial-exec")));
|
|
#else
|
|
extern int tlsvar;
|
|
#endif
|
|
|
|
void *
|
|
in_dso (void)
|
|
{
|
|
return &tlsvar;
|
|
}
|