1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
	and __deallocate_stack with internal_function.
	* pthread_create.c: Adjust definitions appropriately.
	* allocatestack.c: Likewise.

	* pthread_join.c: Add one more __builtin_expect.
	* pthread_timedjoin.c: Likewise.

	* pthread_getspecific.c (__pthread_getspecific): Clear data->data
	not data of sequence number does not match.
	Add one __builtin_expect.
This commit is contained in:
Ulrich Drepper
2003-02-15 09:49:02 +00:00
parent c6247c9d7d
commit 90491dc4bf
7 changed files with 26 additions and 8 deletions

View File

@ -66,7 +66,8 @@ pthread_join (threadid, thread_return)
/* Wait for the thread to finish. If it is already locked something
is wrong. There can only be one waiter. */
if (atomic_compare_and_exchange_acq (&pd->joinid, self, NULL) != 0)
if (__builtin_expect (atomic_compare_and_exchange_acq (&pd->joinid, self,
NULL) != 0, 0))
/* There is already somebody waiting for the thread. */
return EINVAL;