remove remnants of support for running in no-thread-pointer mode

since 1.1.0, musl has nominally required a thread pointer to be setup.
most of the remaining code that was checking for its availability was
doing so for the sake of being usable by the dynamic linker. as of
commit 71f099cb7d, this is no longer
necessary; the thread pointer is now valid before any libc code
(outside of dynamic linker bootstrap functions) runs.

this commit essentially concludes "phase 3" of the "transition path
for removing lazy init of thread pointer" project that began during
the 1.1.0 release cycle.
This commit is contained in:
Rich Felker
2015-04-13 19:24:51 -04:00
parent 71f099cb7d
commit 19a1fe670a
10 changed files with 13 additions and 32 deletions

View File

@ -30,7 +30,7 @@ long __syscall_cp_c(syscall_arg_t nr,
long r;
int st;
if (!libc.has_thread_pointer || (st=(self=__pthread_self())->canceldisable)
if ((st=(self=__pthread_self())->canceldisable)
&& (st==PTHREAD_CANCEL_DISABLE || nr==SYS_close))
return __syscall(nr, u, v, w, x, y, z);
@ -69,7 +69,6 @@ static void cancel_handler(int sig, siginfo_t *si, void *ctx)
void __testcancel()
{
if (!libc.has_thread_pointer) return;
pthread_t self = __pthread_self();
if (self->cancel && !self->canceldisable)
__cancel();