diff options
Diffstat (limited to 'boehm-gc/include/private/specific.h')
-rw-r--r-- | boehm-gc/include/private/specific.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/boehm-gc/include/private/specific.h b/boehm-gc/include/private/specific.h index 399f84f58d6..a0e6ae0ebc1 100644 --- a/boehm-gc/include/private/specific.h +++ b/boehm-gc/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; } |