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

ruby-changes:54196

From: normal <ko1@a...>
Date: Sun, 16 Dec 2018 21:33:48 +0900 (JST)
Subject: [ruby-changes:54196] normal:r66417 (trunk): thread_pthread (ubf_timer_destroy): use VM_ASSERT

normal	2018-12-16 21:33:44 +0900 (Sun, 16 Dec 2018)

  New Revision: 66417

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

  Log:
    thread_pthread (ubf_timer_destroy): use VM_ASSERT
    
    Don't need the overhead at runtime

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 66416)
+++ thread_pthread.c	(revision 66417)
@@ -1795,9 +1795,7 @@ ubf_timer_destroy(void) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1795
         if (timer_delete(timer_posix.timerid) < 0)
             rb_sys_fail("timer_delete");
 
-        if (ATOMIC_EXCHANGE(timer_posix.state, RTIMER_DEAD) != RTIMER_DEAD) {
-            rb_bug("YOU KNOW I'M NOT DEAD\n");
-        }
+        VM_ASSERT(ATOMIC_EXCHANGE(timer_posix.state, RTIMER_DEAD) == RTIMER_DEAD);
     }
 #elif UBF_TIMER == UBF_TIMER_PTHREAD
     int err;

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

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