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

ruby-changes:52163

From: normal <ko1@a...>
Date: Wed, 15 Aug 2018 13:32:42 +0900 (JST)
Subject: [ruby-changes:52163] normal:r64371 (trunk): thread_pthread.c: additional UBF_TIMER == UBF_TIMER_PTHREAD guards

normal	2018-08-15 13:32:36 +0900 (Wed, 15 Aug 2018)

  New Revision: 64371

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64371

  Log:
    thread_pthread.c: additional UBF_TIMER == UBF_TIMER_PTHREAD guards
    
    Hopefully this makes the code easier-to-follow
    
    [ruby-core:88475] [Misc #14937]

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 64370)
+++ thread_pthread.c	(revision 64371)
@@ -1596,7 +1596,8 @@ rb_timer_create(rb_pid_t current) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1596
     else
 	rb_warn("timer_create failed: %s, signals racy", strerror(errno));
 #endif
-    rb_timer_pthread_create(current);
+    if (UBF_TIMER == UBF_TIMER_PTHREAD)
+        ubf_timer_pthread_create(current);
 }
 
 static void
@@ -1620,7 +1621,7 @@ rb_thread_create_timer_thread(void) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1621
         sigwait_th = THREAD_INVALID;
         timer_thread_pipe.owner_process = current;
     }
-    else {
+    else if (UBF_TIMER == UBF_TIMER_PTHREAD) {
         /* UBF_TIMER_PTHREAD needs to recreate after fork */
         rb_timer_pthread_create(current);
     }

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

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