From fd5bdc0924e0cfd1688b632068c1b26f3b0c88da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 15 Oct 2011 16:27:08 -0400 Subject: Optimize access to isXYZ and toXYZ tables The functions to get the pointers can now depend on the TLS variable be initialized. --- nptl/ChangeLog | 4 ++++ nptl/pthread_create.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ae48299..7ff2516 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,7 @@ +2011-10-15 Ulrich Drepper + + * pthread_create.c (start_thread): Ca;; __ctype_init. + 2011-09-15 Andreas Schwab * sysdeps/pthread/list.h: Define only list_t if __need_list_t is diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 34d83f9..f1113fb 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2007,2008,2009,2010 Free Software Foundation, Inc. +/* Copyright (C) 2002-2007,2008,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -239,6 +240,9 @@ start_thread (void *arg) /* Initialize resolver state pointer. */ __resp = &pd->res; + /* Initialize pointers to locale data. */ + __ctype_init (); + /* Allow setxid from now onwards. */ if (__builtin_expect (atomic_exchange_acq (&pd->setxid_futex, 0) == -2, 0)) lll_futex_wake (&pd->setxid_futex, 1, LLL_PRIVATE); -- cgit v1.1