aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-20 08:12:32 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-20 08:12:32 +0000
commit58d2d09bde3578bd25d55df03e962764ba81bd13 (patch)
treea81e5d97ffe5a9b3be7ae44e18a314f78ffa880a /linuxthreads
parent9a1eb38e4e9319036f37c1efbf5288a169e23324 (diff)
downloadglibc-58d2d09bde3578bd25d55df03e962764ba81bd13.tar
glibc-58d2d09bde3578bd25d55df03e962764ba81bd13.tar.gz
glibc-58d2d09bde3578bd25d55df03e962764ba81bd13.tar.bz2
glibc-58d2d09bde3578bd25d55df03e962764ba81bd13.zip
Update.
* sysdeps/generic/dl-tls.c (allocate_dtv): Optimize a bit.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog7
-rw-r--r--linuxthreads/manager.c8
-rw-r--r--linuxthreads/pthread.c3
3 files changed, 13 insertions, 5 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 5b08d3f17a..6b6195b7d2 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,10 @@
+2002-08-20 Ulrich Drepper <drepper@redhat.com>
+
+ * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
+ Pass true to _dl_deallocate_tls.
+ (pthread_free): Likewise.
+ * pthread.c (__pthread_initialize_manager): Likewise.
+
2002-08-19 Ulrich Drepper <drepper@redhat.com>
* sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 655c7d64ab..24be94129b 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -599,7 +599,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
int saved_errno = 0;
#ifdef USE_TLS
- new_thread = _dl_allocate_tls ();
+ new_thread = _dl_allocate_tls (NULL);
if (new_thread == NULL)
return EAGAIN;
#else
@@ -619,7 +619,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
if (sseg >= PTHREAD_THREADS_MAX)
{
#ifdef USE_TLS
- _dl_deallocate_tls (new_thread);
+ _dl_deallocate_tls (new_thread, true);
#endif
return EAGAIN;
}
@@ -803,7 +803,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
#endif
}
#ifdef USE_TLS
- _dl_deallocate_tls (new_thread);
+ _dl_deallocate_tls (new_thread, true);
#endif
__pthread_handles[sseg].h_descr = NULL;
__pthread_handles[sseg].h_bottom = NULL;
@@ -890,7 +890,7 @@ static void pthread_free(pthread_descr th)
munmap(guardaddr, stacksize + guardsize);
#ifdef USE_TLS
- _dl_deallocate_tls (th);
+ _dl_deallocate_tls (th, true);
#endif
}
}
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index c43176c40f..b0ef7fb1be 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -623,7 +623,8 @@ int __pthread_initialize_manager(void)
#ifdef USE_TLS
/* Allocate memory for the thread descriptor and the dtv. */
- __pthread_handles[1].h_descr = manager_thread = tcb = _dl_allocate_tls ();
+ __pthread_handles[1].h_descr = manager_thread = tcb
+ = _dl_allocate_tls (NULL);
if (tcb == NULL) {
free(__pthread_manager_thread_bos);
__libc_close(manager_pipe[0]);