aboutsummaryrefslogtreecommitdiff
path: root/nptl
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
parent2d1f3a4db65d2731a695dee6b973accea8b9adc0 (diff)
downloadglibc-fd5bdc0924e0cfd1688b632068c1b26f3b0c88da.zip
glibc-fd5bdc0924e0cfd1688b632068c1b26f3b0c88da.tar.gz
glibc-fd5bdc0924e0cfd1688b632068c1b26f3b0c88da.tar.bz2
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')
-rw-r--r--nptl/ChangeLog4
-rw-r--r--nptl/pthread_create.c6
2 files changed, 9 insertions, 1 deletions
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 <drepper@gmail.com>
+
+ * pthread_create.c (start_thread): Ca;; __ctype_init.
+
2011-09-15 Andreas Schwab <schwab@redhat.com>
* 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 <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);