Skip to content
Commit 0e75c4a4 authored by Samuel Thibault's avatar Samuel Thibault
Browse files

hurd: Fix pthread_self() without libpthread

5476f8cd ("htl: move pthread_self info libc.") moved the htl
pthread_self() function from libpthread to libc, replacing the previous libc
stub that just returns 0. And 53da64d1 ("htl: Initialize ___pthread_self
early") added initialization code which is needed before being able to
call pthread_self. It is currently in libpthread, and thus never called
before programs can call pthread_self from libc, which then segfaults
when accessing _pthread_self()->thread.

This moves the initialization to libc itself, as initialized variables, so
pthread_self can always be called fine.
parent 43224b13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment