mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 14:20:07 +00:00
Update.
* pthread_join.c (pthread_join): Set tid field of the joined thread to -1. This isn't necessary but helps to recognize some error conditions with almost no cost. * allocatestack.c (FREE_P): Also negative values indicate an unused stack.
This commit is contained in:
parent
bc58c14e33
commit
7ac5b8e2fa
@ -1,5 +1,12 @@
|
||||
2003-05-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* pthread_join.c (pthread_join): Set tid field of the joined
|
||||
thread to -1. This isn't necessary but helps to recognize some
|
||||
error conditions with almost no cost.
|
||||
|
||||
* allocatestack.c (FREE_P): Also negative values indicate an
|
||||
unused stack.
|
||||
|
||||
* unwind.c: Include <unistd.h>.
|
||||
|
||||
2003-05-14 Ulrich Drepper <drepper@redhat.com>
|
||||
|
@ -111,7 +111,7 @@ static unsigned int nptl_ncreated;
|
||||
|
||||
|
||||
/* Check whether the stack is still used or not. */
|
||||
#define FREE_P(descr) ((descr)->tid == 0)
|
||||
#define FREE_P(descr) ((descr)->tid <= 0)
|
||||
|
||||
|
||||
/* We create a double linked list of all cache entries. Double linked
|
||||
|
@ -93,6 +93,9 @@ pthread_join (threadid, thread_return)
|
||||
pthread_cleanup_pop (0);
|
||||
|
||||
|
||||
/* We mark the thread as terminated and as joined. */
|
||||
pd->tid = -1;
|
||||
|
||||
/* Store the return value if the caller is interested. */
|
||||
if (thread_return != NULL)
|
||||
*thread_return = pd->result;
|
||||
|
Loading…
Reference in New Issue
Block a user