1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Optimize access to isXYZ and toXYZ tables

The functions to get the pointers can now depend on the TLS variable
be initialized.
This commit is contained in:
Ulrich Drepper
2011-10-15 16:27:08 -04:00
parent 2d1f3a4db6
commit fd5bdc0924
10 changed files with 135 additions and 18 deletions

View File

@ -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);