summaryrefslogtreecommitdiff
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
commitecd35c0d9692704c7c1298ef9d38a73687d383fb (patch)
tree948dd927a352dd090f34ea7ff932930c4a15b2ec /eval_intern.h
parent5848032ce5784083e230c608b3b63d9072fa40f8 (diff)
* 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
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 a7b57e8..b5133f0 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);