1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-09-11 12:10:50 +03:00
* sysdeps/generic/dl-tls.c (allocate_dtv): Optimize a bit.
This commit is contained in:
Ulrich Drepper
2002-08-20 08:12:32 +00:00
parent 9a1eb38e4e
commit 58d2d09bde
5 changed files with 18 additions and 10 deletions

View File

@@ -212,11 +212,9 @@ allocate_dtv (void *result)
{
/* This is the initial length of the dtv. */
dtv[0].counter = dtv_length;
/* Fill in the generation number. */
dtv[1].counter = GL(dl_tls_generation) = 0;
/* Initialize all of the rest of the dtv with zero to indicate
nothing there. */
memset (dtv + 2, '\0', dtv_length * sizeof (dtv_t));
/* Initialize all of the rest of the dtv (including the
generation counter) with zero to indicate nothing there. */
memset (dtv + 1, '\0', (dtv_length + 1) * sizeof (dtv_t));
/* Add the dtv to the thread data structures. */
INSTALL_DTV (result, dtv);