mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 22:10:13 +00:00
htl: Destroy thread-specific data before releasing joins
Applications may want to assume that after pthread_join() returns, all thread-specific data has been released.
This commit is contained in:
parent
06dbfcced3
commit
7a06be051c
@ -54,6 +54,9 @@ __pthread_exit (void *status)
|
|||||||
/* We are the last thread. */
|
/* We are the last thread. */
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
|
/* Destroy any thread specific data. */
|
||||||
|
__pthread_destroy_specific (self);
|
||||||
|
|
||||||
/* Note that after this point the process can be terminated at any
|
/* Note that after this point the process can be terminated at any
|
||||||
point if another thread calls `pthread_exit' and happens to be
|
point if another thread calls `pthread_exit' and happens to be
|
||||||
the last thread. */
|
the last thread. */
|
||||||
@ -92,9 +95,6 @@ __pthread_exit (void *status)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Destroy any thread specific data. */
|
|
||||||
__pthread_destroy_specific (self);
|
|
||||||
|
|
||||||
/* Destroy any signal state. */
|
/* Destroy any signal state. */
|
||||||
__pthread_sigstate_destroy (self);
|
__pthread_sigstate_destroy (self);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user