Update.
2003-03-07 Ulrich Drepper <drepper@redhat.com> * init.c (__static_tls_align_m1): Renamed from __static_tls_align. (__pthread_initialize_minimal_internal): Change initialization of __static_tls_align_m1 appropriately. * pthreadP.h (__static_tls_align_m1): Renamed from __static_tls_align. * allocatestack.c (allocate_stack): Use __static_tls_align_m1 instead of __static_tls_align-1.
This commit is contained in:
parent
923e02eae4
commit
bc6389ad56
|
@ -1,3 +1,13 @@
|
||||||
|
2003-03-07 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* init.c (__static_tls_align_m1): Renamed from __static_tls_align.
|
||||||
|
(__pthread_initialize_minimal_internal): Change initialization of
|
||||||
|
__static_tls_align_m1 appropriately.
|
||||||
|
* pthreadP.h (__static_tls_align_m1): Renamed from
|
||||||
|
__static_tls_align.
|
||||||
|
* allocatestack.c (allocate_stack): Use __static_tls_align_m1
|
||||||
|
instead of __static_tls_align-1.
|
||||||
|
|
||||||
2003-03-04 Ulrich Drepper <drepper@redhat.com>
|
2003-03-04 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
|
* sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
|
||||||
|
|
|
@ -248,7 +248,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
/* Adjust stack size for alignment of the TLS block. */
|
/* Adjust stack size for alignment of the TLS block. */
|
||||||
adj = ((uintptr_t) attr->stackaddr) & (__static_tls_align - 1);
|
adj = ((uintptr_t) attr->stackaddr) & __static_tls_align_m1;
|
||||||
assert (size > adj);
|
assert (size > adj);
|
||||||
|
|
||||||
/* The user provided some memory. Let's hope it matches the
|
/* The user provided some memory. Let's hope it matches the
|
||||||
|
@ -308,7 +308,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||||
size_t reqsize;
|
size_t reqsize;
|
||||||
void *mem;
|
void *mem;
|
||||||
|
|
||||||
#undef COLORING_INCREMENT
|
|
||||||
#if COLORING_INCREMENT != 0
|
#if COLORING_INCREMENT != 0
|
||||||
/* Add one more page for stack coloring. Don't to it for stacks
|
/* Add one more page for stack coloring. Don't to it for stacks
|
||||||
with 16 times pagesize or larger. This might just cause
|
with 16 times pagesize or larger. This might just cause
|
||||||
|
@ -318,7 +317,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Adjust the stack size for alignment. */
|
/* Adjust the stack size for alignment. */
|
||||||
size &= ~(__static_tls_align - 1);
|
size &= ~__static_tls_align_m1;
|
||||||
assert (size != 0);
|
assert (size != 0);
|
||||||
|
|
||||||
/* Make sure the size of the stack is enough for the guard and
|
/* Make sure the size of the stack is enough for the guard and
|
||||||
|
@ -359,9 +358,9 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||||
|
|
||||||
/* Make sure the coloring offsets does not disturb the alignment
|
/* Make sure the coloring offsets does not disturb the alignment
|
||||||
of the TCB and static TLS block. */
|
of the TCB and static TLS block. */
|
||||||
if (__builtin_expect ((coloring & (__static_tls_align - 1)) != 0, 0))
|
if (__builtin_expect ((coloring & __static_tls_align_m1) != 0, 0))
|
||||||
coloring = (((coloring + __static_tls_align - 1)
|
coloring = (((coloring + __static_tls_align_m1)
|
||||||
& ~(__static_tls_align - 1))
|
& ~(__static_tls_align_m1))
|
||||||
& ~pagesize_m1);
|
& ~pagesize_m1);
|
||||||
#else
|
#else
|
||||||
/* Unless specified we do not make any adjustments. */
|
/* Unless specified we do not make any adjustments. */
|
||||||
|
|
|
@ -39,7 +39,7 @@ extern size_t __default_stacksize attribute_hidden;
|
||||||
|
|
||||||
/* Size and alignment of static TLS block. */
|
/* Size and alignment of static TLS block. */
|
||||||
extern size_t __static_tls_size attribute_hidden;
|
extern size_t __static_tls_size attribute_hidden;
|
||||||
extern size_t __static_tls_align attribute_hidden;
|
extern size_t __static_tls_align_m1 attribute_hidden;
|
||||||
|
|
||||||
/* Thread descriptor handling. */
|
/* Thread descriptor handling. */
|
||||||
extern list_t __stack_user;
|
extern list_t __stack_user;
|
||||||
|
|
Loading…
Reference in New Issue