summary refs log tree commit diff
path: root/nptl/pthread_getspecific.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-15 09:49:02 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-15 09:49:02 +0000
commit90491dc4bf7a2c4232565ea68c9bda1383f97ae6 (patch)
treed00ccc5fc77334ca06edeaa13afc6a3ad083f047 /nptl/pthread_getspecific.c
parentc6247c9d7daab9faa51ae571d4b12a337e9b15ff (diff)
downloadglibc-90491dc4bf7a2c4232565ea68c9bda1383f97ae6.tar.gz
glibc-90491dc4bf7a2c4232565ea68c9bda1383f97ae6.tar.xz
glibc-90491dc4bf7a2c4232565ea68c9bda1383f97ae6.zip
Update.
	* 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.
Diffstat (limited to 'nptl/pthread_getspecific.c')
-rw-r--r--nptl/pthread_getspecific.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/pthread_getspecific.c b/nptl/pthread_getspecific.c
index 24c472d640..afb4d26ffd 100644
--- a/nptl/pthread_getspecific.c
+++ b/nptl/pthread_getspecific.c
@@ -59,8 +59,8 @@ __pthread_getspecific (key)
     {
       uintptr_t seq = data->seq;
 
-      if (seq != __pthread_keys[key].seq)
-	result = data = NULL;
+      if (__builtin_expect (seq != __pthread_keys[key].seq, 0))
+	result = data->data = NULL;
     }
 
   return result;