summaryrefslogtreecommitdiff
path: root/include/private/specific.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/specific.h')
-rw-r--r--include/private/specific.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/private/specific.h b/include/private/specific.h
index 399f84f..d04e19f 100644
--- a/include/private/specific.h
+++ b/include/private/specific.h
@@ -85,7 +85,7 @@ static __inline__ void * PREFIXED(getspecific) (tsd * key) {
unsigned hash_val = CACHE_HASH(qtid);
tse * volatile * entry_ptr = key -> cache + hash_val;
tse * entry = *entry_ptr; /* Must be loaded only once. */
- if (entry -> qtid == qtid) {
+ if (EXPECT(entry -> qtid == qtid, 1)) {
GC_ASSERT(entry -> thread == pthread_self());
return entry -> value;
}