diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 04:52:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 04:52:01 +0000 |
commit | ecd35c0d9692704c7c1298ef9d38a73687d383fb (patch) | |
tree | 948dd927a352dd090f34ea7ff932930c4a15b2ec /thread.c | |
parent | 5848032ce5784083e230c608b3b63d9072fa40f8 (diff) | |
download | ruby-ecd35c0d9692704c7c1298ef9d38a73687d383fb.tar.gz |
* 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 'thread.c')
-rw-r--r-- | thread.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -845,22 +845,22 @@ rb_thread_signal_exit(void *thptr) } int -thread_set_raised(rb_thread_t *th) +rb_thread_set_raised(rb_thread_t *th) { - if (th->raised_flag) { + if (th->raised_flag & RAISED_EXCEPTION) { return 1; } - th->raised_flag = 1; + th->raised_flag |= RAISED_EXCEPTION; return 0; } int -thread_reset_raised(rb_thread_t *th) +rb_thread_reset_raised(rb_thread_t *th) { - if (th->raised_flag == 0) { + if (!(th->raised_flag & RAISED_EXCEPTION)) { return 0; } - th->raised_flag = 0; + th->raised_flag &= ~RAISED_EXCEPTION; return 1; } @@ -3005,7 +3005,7 @@ ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always) th->tracing = 1; } - raised = thread_reset_raised(th); + raised = rb_thread_reset_raised(th); PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { @@ -3013,7 +3013,7 @@ ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always) } if (raised) { - thread_set_raised(th); + rb_thread_set_raised(th); } POP_TAG(); |