summaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 04:16:06 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 04:16:06 +0000
commit10575a7ee241c9986822d9cf3e048964b4c8f5ad (patch)
tree586fd664680dab1af107c4867000d4280ff054e7 /vm_core.h
parent6fdb6ee1eb644e9b5986f2f532b7016312d3fbde (diff)
downloadruby-10575a7ee241c9986822d9cf3e048964b4c8f5ad.tar.gz
ruby-10575a7ee241c9986822d9cf3e048964b4c8f5ad.tar.xz
ruby-10575a7ee241c9986822d9cf3e048964b4c8f5ad.zip
* vm_core.h, thread.c, cont.c: add RUBY_VM_SET_INTERRUPT(),
RUBY_VM_SET_TIMER_INTERRUPT(), RUBY_VM_INTERRUPTED(). * thread.c, thread_pthread.c, thread_win32.c: fix to ignore time slice event until sleep. * bootstraptest/test_thread.rb: add a test for time limited join test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 98c57300c..dbffab1c4 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -634,6 +634,10 @@ extern rb_vm_t *ruby_current_vm;
#error "unsupported thread model"
#endif
+#define RUBY_VM_SET_INTERRUPT(th) ((th)->interrupt_flag |= 0x02)
+#define RUBY_VM_SET_TIMER_INTERRUPT(th) ((th)->interrupt_flag |= 0x01)
+#define RUBY_VM_INTERRUPTED(th) ((th)->interrupt_flag & 0x02)
+
void rb_thread_execute_interrupts(rb_thread_t *);
#define RUBY_VM_CHECK_INTS_TH(th) do { \