[前][次][番号順一覧][スレッド一覧]

ruby-changes:72442

From: Jean <ko1@a...>
Date: Thu, 7 Jul 2022 02:57:42 +0900 (JST)
Subject: [ruby-changes:72442] c6b38e43b0 (master): thread_pthread.c: Remove useless call to pthread_rwlock_init

https://git.ruby-lang.org/ruby.git/commit/?id=c6b38e43b0

From c6b38e43b030782fcb95ed57333d69fe75863503 Mon Sep 17 00:00:00 2001
From: Jean Boussier <jean.boussier@g...>
Date: Thu, 30 Jun 2022 15:54:26 +0200
Subject: thread_pthread.c: Remove useless call to pthread_rwlock_init

---
 thread_pthread.c | 7 +------
 1 file changed, 1 insertion(+), 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) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L789
 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);
         }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]