summaryrefslogtreecommitdiff
path: root/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'thread_pthread.h')
-rw-r--r--thread_pthread.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/thread_pthread.h b/thread_pthread.h
index b5314082d5..3f6db3ed03 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -102,11 +102,8 @@ typedef pthread_key_t native_tls_key_t;
static inline void *
native_tls_get(native_tls_key_t key)
{
- void *ptr = pthread_getspecific(key);
- if (UNLIKELY(ptr == NULL)) {
- rb_bug("pthread_getspecific returns NULL");
- }
- return ptr;
+ // return value should be checked by caller
+ return pthread_getspecific(key);
}
static inline void