summaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 08:21:24 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 08:21:24 +0000
commitc205c9aafadd5f7c5e95348c48fe1ab1525137ec (patch)
treef463b7c587f8cfb1d0d5d5704518885b1c3d899e /thread.c
parent71ad9f671c5ea48572a141dde6292bc651dbbcd7 (diff)
downloadruby-c205c9aafadd5f7c5e95348c48fe1ab1525137ec.tar.gz
ruby-c205c9aafadd5f7c5e95348c48fe1ab1525137ec.tar.xz
ruby-c205c9aafadd5f7c5e95348c48fe1ab1525137ec.zip
* thread.c (rb_thread_check_ints): added. please note that
this function may cause ruby's thread switching. * include/ruby/intern.h: ditto. * regint.h: use rb_thread_check_ints() instead of RUBY_CHECK_INTS() directly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 20cb6b931..e30e4e33d 100644
--- a/thread.c
+++ b/thread.c
@@ -877,6 +877,19 @@ rb_thread_polling(void)
}
}
+/*
+ * CAUTION: This function causes thread switching.
+ * rb_thread_check_ints() check ruby's interrupts.
+ * some interrupt needs thread switching/invoke handlers,
+ * and so on.
+ */
+
+void
+rb_thread_check_ints(void)
+{
+ RUBY_VM_CHECK_INTS();
+}
+
struct timeval rb_time_timeval();
void