summaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-26 12:38:38 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-26 12:38:38 +0000
commitf5427d28f240aa1c0426b7cc8e05b13eeb961490 (patch)
tree5d358667839e8e79cfe97feb1063a8f8dd6ea3b5 /vm_core.h
parentfcc60dfa66ae1f39a24386ba0ed83265bfb2e928 (diff)
downloadruby-f5427d28f240aa1c0426b7cc8e05b13eeb961490.tar.gz
ruby-f5427d28f240aa1c0426b7cc8e05b13eeb961490.tar.xz
ruby-f5427d28f240aa1c0426b7cc8e05b13eeb961490.zip
* vm_core.h (RUBY_VM_CHECK_INTS_TH): add an UNLIKELY hint.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_core.h b/vm_core.h
index 68772cd11..a071f83ca 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -571,7 +571,6 @@ typedef rb_control_frame_t *
((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 @@ extern rb_vm_t *ruby_current_vm;
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)