diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-15 16:27:08 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-15 16:27:08 -0400 |
commit | fd5bdc0924e0cfd1688b632068c1b26f3b0c88da (patch) | |
tree | aac5e56322b05ae60be779de324b90087fb99dc4 /ctype/ctype-info.c | |
parent | 2d1f3a4db65d2731a695dee6b973accea8b9adc0 (diff) | |
download | glibc-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 'ctype/ctype-info.c')
-rw-r--r-- | ctype/ctype-info.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ctype/ctype-info.c b/ctype/ctype-info.c index 03b67d1..b64e743 100644 --- a/ctype/ctype-info.c +++ b/ctype/ctype-info.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008 +/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -26,6 +26,19 @@ __libc_tsd_define (, const int32_t *, CTYPE_TOLOWER) __libc_tsd_define (, const int32_t *, CTYPE_TOUPPER) +void +__ctype_init (void) +{ + const uint16_t **bp = __libc_tsd_address (const uint16_t *, CTYPE_B); + *bp = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128; + const int32_t **up = __libc_tsd_address (const int32_t *, CTYPE_TOUPPER); + *up = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128); + const int32_t **lp = __libc_tsd_address (const int32_t *, CTYPE_TOLOWER); + *lp = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128); +} +libc_hidden_def (__ctype_init) + + #include <shlib-compat.h> #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) |