mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
2003-02-21 Roland McGrath <roland@redhat.com>
* pthread_create.c (start_thread): Call __libc_thread_freeres.
This commit is contained in:
@ -25,6 +25,7 @@
|
|||||||
#include <hp-timing.h>
|
#include <hp-timing.h>
|
||||||
#include <ldsodefs.h>
|
#include <ldsodefs.h>
|
||||||
#include <atomic.h>
|
#include <atomic.h>
|
||||||
|
#include <libc-internal.h>
|
||||||
|
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
@ -227,6 +228,8 @@ start_thread (void *arg)
|
|||||||
pd->result = pd->start_routine (pd->arg);
|
pd->result = pd->start_routine (pd->arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clean up any state libc stored in thread-local variables. */
|
||||||
|
__libc_thread_freeres ();
|
||||||
|
|
||||||
/* If this is the last thread we terminate the process now. We
|
/* If this is the last thread we terminate the process now. We
|
||||||
do not notify the debugger, it might just irritate it if there
|
do not notify the debugger, it might just irritate it if there
|
||||||
@ -235,7 +238,6 @@ start_thread (void *arg)
|
|||||||
/* This was the last thread. */
|
/* This was the last thread. */
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
|
|
||||||
/* Report the death of the thread if this is wanted. */
|
/* Report the death of the thread if this is wanted. */
|
||||||
if (__builtin_expect (pd->report_events, 0))
|
if (__builtin_expect (pd->report_events, 0))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user