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

ruby-changes:8065

From: ko1 <ko1@a...>
Date: Fri, 26 Sep 2008 21:38:59 +0900 (JST)
Subject: [ruby-changes:8065] Ruby:r19591 (trunk): * vm_core.h (RUBY_VM_CHECK_INTS_TH): add an UNLIKELY hint.

ko1	2008-09-26 21:38:38 +0900 (Fri, 26 Sep 2008)

  New Revision: 19591

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

  Log:
    * vm_core.h (RUBY_VM_CHECK_INTS_TH): add an UNLIKELY hint.

  Modified files:
    trunk/ChangeLog
    trunk/vm_core.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19590)
+++ ChangeLog	(revision 19591)
@@ -1,3 +1,7 @@
+Fri Sep 26 21:36:33 2008  Koichi Sasada  <ko1@a...>
+
+	* vm_core.h (RUBY_VM_CHECK_INTS_TH): add an UNLIKELY hint.
+
 Fri Sep 26 19:33:36 2008  Tanaka Akira  <akr@f...>
 
 	* include/ruby/encoding.h (rb_str_encode): renamed from
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 19590)
+++ vm_core.h	(revision 19591)
@@ -571,7 +571,6 @@
   ((rb_control_frame_t *)((VALUE *)(b) - 5))
 
 /* VM related object allocate functions */
-/* TODO: should be static functions */
 VALUE rb_thread_alloc(VALUE klass);
 VALUE rb_proc_alloc(VALUE klass);
 
@@ -624,8 +623,7 @@
 void rb_thread_execute_interrupts(rb_thread_t *);
 
 #define RUBY_VM_CHECK_INTS_TH(th) do { \
-  if (th->interrupt_flag) { \
-    /* TODO: trap something event */ \
+  if (UNLIKELY(th->interrupt_flag)) { \
     rb_thread_execute_interrupts(th); \
   } \
 } while (0)

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

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