1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +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

@ -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
}
}