From 58d2d09bde3578bd25d55df03e962764ba81bd13 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Aug 2002 08:12:32 +0000 Subject: Update. * sysdeps/generic/dl-tls.c (allocate_dtv): Optimize a bit. --- sysdeps/generic/dl-tls.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c index 38f40ac8ae..c969464449 100644 --- a/sysdeps/generic/dl-tls.c +++ b/sysdeps/generic/dl-tls.c @@ -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); -- cgit v1.2.3