summaryrefslogtreecommitdiffstats
path: root/eval_intern.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-28 04:52:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-28 04:52:01 +0000
commit71f1b5e446c2a7cc4f01e3e13444ab0035900852 (patch)
tree948dd927a352dd090f34ea7ff932930c4a15b2ec /eval_intern.h
parent992f9678f7be29a9bbe2e7a57479859c283a6239 (diff)
downloadruby-71f1b5e446c2a7cc4f01e3e13444ab0035900852.tar.gz
ruby-71f1b5e446c2a7cc4f01e3e13444ab0035900852.tar.xz
ruby-71f1b5e446c2a7cc4f01e3e13444ab0035900852.zip
* eval.c (stack_check): made flag per threads.
* thread.c (rb_thread_set_raised, rb_thread_reset_raised): prefixed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/eval_intern.h b/eval_intern.h
index a7b57e86d..b5133f046 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);