summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2022-06-30 15:54:26 +0200
committerJean Boussier <jean.boussier@gmail.com>2022-07-06 19:57:27 +0200
commitc6b38e43b030782fcb95ed57333d69fe75863503 (patch)
tree4a9b986c574fc99cd104bb5735a23d45edff6269 /thread_pthread.c
parenta2e0815e27e7eb35d57a5bd4c09630797e1869fc (diff)
thread_pthread.c: Remove useless call to pthread_rwlock_init
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6083
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index da0efeb99b..02a3640bdb 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -789,14 +789,9 @@ native_thread_init(struct rb_native_thread *nt)
void
Init_native_thread(rb_thread_t *main_th)
{
- int r;
- if ((r = pthread_rwlock_init(&rb_internal_thread_event_hooks_rw_lock, NULL))) {
- rb_bug_errno("pthread_rwlock_init", r);
- }
-
#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK)
if (condattr_monotonic) {
- r = pthread_condattr_init(condattr_monotonic);
+ int r = pthread_condattr_init(condattr_monotonic);
if (r == 0) {
r = pthread_condattr_setclock(condattr_monotonic, CLOCK_MONOTONIC);
}