From ecd35c0d9692704c7c1298ef9d38a73687d383fb Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 28 Feb 2008 04:52:01 +0000 Subject: * eval.c (stack_check): made flag per threads. * thread.c (rb_thread_set_raised, rb_thread_reset_raised): prefixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval_intern.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'eval_intern.h') diff --git a/eval_intern.h b/eval_intern.h index a7b57e86d2..b5133f0460 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -195,8 +195,16 @@ while (0) void rb_thread_cleanup(void); void rb_thread_wait_other_threads(void); -int thread_set_raised(rb_thread_t *th); -int thread_reset_raised(rb_thread_t *th); +#define RAISED_EXCEPTION 1 +#define RAISED_STACKOVERFLOW 2 +int rb_thread_set_raised(rb_thread_t *th); +int rb_thread_reset_raised(rb_thread_t *th); +#define rb_thread_set_stack_overflow(th) \ + ((th)->raised_flag |= RAISED_STACKOVERFLOW) +#define rb_thread_reset_stack_overflow(th) \ + ((th)->raised_flag &= ~RAISED_STACKOVERFLOW) +#define rb_thread_stack_overflowing_p(th) \ + (((th)->raised_flag & RAISED_STACKOVERFLOW) != 0) VALUE rb_f_eval(int argc, VALUE *argv, VALUE self); VALUE rb_make_exception(int argc, VALUE *argv); -- cgit v1.2.1