summaryrefslogtreecommitdiff
path: root/nptl/init.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-07 09:53:04 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-07 09:53:04 +0000
commit923e02eae45c3e4c9b6bdd2b8e5613718e8cb54b (patch)
tree1ed2bdfbb7f080e8bca36e639ef30a7e72826972 /nptl/init.c
parent2090a1d0d30155c22fcc62c6d4a9d6edf90b507a (diff)
(__static_tls_align_m1): Renamed from __static_tls_align. (__pthread_initialize_minimal_internal): Change initialization of __static_tls_align_m1 appropriately.
Diffstat (limited to 'nptl/init.c')
-rw-r--r--nptl/init.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/nptl/init.c b/nptl/init.c
index cc496a240f..16926e4712 100644
--- a/nptl/init.c
+++ b/nptl/init.c
@@ -47,7 +47,7 @@ size_t __default_stacksize attribute_hidden;
/* Size and alignment of static TLS block. */
size_t __static_tls_size;
-size_t __static_tls_align;
+size_t __static_tls_align_m1;
/* Version of the library, used in libthread_db to detect mismatches. */
static const char nptl_version[] = VERSION;
@@ -228,12 +228,15 @@ __pthread_initialize_minimal_internal (void)
/* Get the size of the static and alignment requirements for the TLS
block. */
- _dl_get_tls_static_info (&__static_tls_size, &__static_tls_align);
+ size_t static_tls_align;
+ _dl_get_tls_static_info (&__static_tls_size, &static_tls_align);
/* Make sure the size takes all the alignments into account. */
- if (STACK_ALIGN > __static_tls_align)
- __static_tls_align = STACK_ALIGN;
- __static_tls_size = roundup (__static_tls_size, __static_tls_align);
+ if (STACK_ALIGN > static_tls_align)
+ static_tls_align = STACK_ALIGN;
+ __static_tls_align_m1 = static_tls_align - 1;
+
+ __static_tls_size = roundup (__static_tls_size, static_tls_align);
#ifdef SHARED
/* Transfer the old value from the dynamic linker's internal location. */