mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
* sysdeps/generic/dl-tls.c (allocate_dtv): Optimize a bit.
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user