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

ruby-changes:33825

From: nobu <ko1@a...>
Date: Sat, 10 May 2014 23:47:15 +0900 (JST)
Subject: [ruby-changes:33825] nobu:r45906 (trunk): thread_pthread.c: compare with pthread_equal

nobu	2014-05-10 23:47:04 +0900 (Sat, 10 May 2014)

  New Revision: 45906

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45906

  Log:
    thread_pthread.c: compare with pthread_equal
    
    * thread_pthread.c (ubf_select): compare thread_id with
      pthread_equal() but not directly.

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 45905)
+++ thread_pthread.c	(revision 45906)
@@ -1172,7 +1172,7 @@ ubf_select(void *ptr) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1172
      * In the other hands, we shouldn't call rb_thread_wakeup_timer_thread()
      * if running on timer thread because it may make endless wakeups.
      */
-    if (pthread_self() != timer_thread_id)
+    if (!pthread_equal(pthread_self(), timer_thread_id))
 	rb_thread_wakeup_timer_thread();
     ubf_select_each(th);
 }

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

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