From 3b391db91f70b2166951413ee1eccc78cd398a44 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 19 Feb 2014 21:30:22 +0100 Subject: Make name resolution thread-safe * pthread/pt-alloc.c (initialize_pthread): Reset resolver state. * pthread/pt-create.c: Include . (entry_point): Update the __resp TLS variable to point to the resolver state of the current thread. * pthread/pt-internal.h: Define __need_res_state and include . (struct __pthread): New `res_state' member. --- pthread/pt-create.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pthread/pt-create.c') diff --git a/pthread/pt-create.c b/pthread/pt-create.c index 5358b08..c2c84b1 100644 --- a/pthread/pt-create.c +++ b/pthread/pt-create.c @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -45,6 +46,7 @@ entry_point (struct __pthread *self, void *(*start_routine)(void *), void *arg) { #ifdef ENABLE_TLS ___pthread_self = self; + __resp = &self->res_state; #endif #ifdef IS_IN_libpthread -- cgit v1.2.3