yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame^] | 1 | /* libpthread sets _dl_error_catch_tsd to point to this function. |
| 2 | We define it here instead of in libpthread so t 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 | |
| 5 | void **__libc_dl_error_tsd(void) __attribute__ ((const)); |
| 6 | void ** __attribute__ ((const)) |
| 7 | __libc_dl_error_tsd (void) |
| 8 | { |
| 9 | static __thread void *data __attribute__ ((tls_model ("initial-exec"))); |
| 10 | return &data; |
| 11 | } |