diff options
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r-- | thread_pthread.ci | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/thread_pthread.ci b/thread_pthread.ci index a8ffcb0c78..b28301704a 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -16,13 +16,8 @@ void native_mutex_lock(pthread_mutex_t *lock) { int r; - r = pthread_mutex_trylock(lock); - if (r == EBUSY) { - r = pthread_mutex_lock(lock); - - if (r != 0) { - rb_bug("pthread_mutex_lock: %d", r); - } + if ((r = pthread_mutex_lock(lock)) != 0) { + rb_bug("pthread_mutex_lock: %d", r); } } |