tst-tlsmod16b.c 227 B

12345678910111213
  1. #include <tls.h>
  2. #if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
  3. extern __thread int tlsvar __attribute__((tls_model("initial-exec")));
  4. #else
  5. extern int tlsvar;
  6. #endif
  7. void *
  8. in_dso (void)
  9. {
  10. return &tlsvar;
  11. }