From 8f1e7a37e520fd1b105bec102cb05d2b49acf4a2 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 13 Aug 2008 08:21:24 +0000 Subject: * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@18572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 20cb6b931f..e30e4e33d7 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 -- cgit v1.2.3