summaryrefslogtreecommitdiff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-15 16:27:08 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-15 16:27:08 -0400
commitfd5bdc0924e0cfd1688b632068c1b26f3b0c88da (patch)
treeaac5e56322b05ae60be779de324b90087fb99dc4 /nptl/pthread_create.c
parent2d1f3a4db65d2731a695dee6b973accea8b9adc0 (diff)
downloadglibc-fd5bdc0924e0cfd1688b632068c1b26f3b0c88da.tar.gz
Optimize access to isXYZ and toXYZ tables
The functions to get the pointers can now depend on the TLS variable be initialized.
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 34d83f94ad..f1113fb9b4 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 <drepper@redhat.com>, 2002.
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ctype.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -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);