tsd.c 416 B

1234567891011
  1. /* libpthread sets _dl_error_catch_tsd to point to this function.
  2. We define it here instead of in libpthread so that it doesn't
  3. need to have a TLS segment of its own just for this one pointer. */
  4. void **__libc_dl_error_tsd(void) __attribute__ ((const));
  5. void ** __attribute__ ((const))
  6. __libc_dl_error_tsd (void)
  7. {
  8. static __thread void *data __attribute__ ((tls_model ("initial-exec")));
  9. return &data;
  10. }