diff options
Diffstat (limited to 'sysdeps/mach/hurd/htl/pt-pthread_self.c')
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-pthread_self.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/htl/pt-pthread_self.c b/sysdeps/mach/hurd/htl/pt-pthread_self.c index 04fa283aab..d11d0ec676 100644 --- a/sysdeps/mach/hurd/htl/pt-pthread_self.c +++ b/sysdeps/mach/hurd/htl/pt-pthread_self.c @@ -17,6 +17,14 @@ <https://www.gnu.org/licenses/>. */ #include <pt-sysdep.h> +#include <pt-internal.h> -__thread struct __pthread *___pthread_self; +/* Initial thread structure used before libpthread is initialized, so various + * functions can already work at least basically. */ +struct __pthread __pthread_init_thread = { + .thread = 1, +}; +libc_hidden_def (__pthread_init_thread) + +__thread struct __pthread *___pthread_self = &__pthread_init_thread; libc_hidden_tls_def (___pthread_self) |