summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-17 00:10:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-17 00:10:47 +0000
commit61d9da258d0701c25f4876bb89fbbd3912b3ef98 (patch)
tree7babbcd6f970afd9409bd6e7bd4a3e2c567bb541 /gc.c
parentb0d36494797b08d7cc7a9c62c2c1a748297a7aaf (diff)
downloadruby-61d9da258d0701c25f4876bb89fbbd3912b3ef98.tar.gz
gc.c: rb_threadptr_stack_check
* gc.c (rb_threadptr_stack_check): check probability of stack overflow for the given thread, not the current thread. * vm_eval.c (stack_check): check the given thread, not the current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index ef4770a797..2c23abf0fa 100644
--- a/gc.c
+++ b/gc.c
@@ -3966,6 +3966,12 @@ stack_check(rb_thread_t *th, int water_mark)
#define STACKFRAME_FOR_CALL_CFUNC 512
int
+rb_threadptr_stack_check(rb_thread_t *th)
+{
+ return stack_check(th, STACKFRAME_FOR_CALL_CFUNC);
+}
+
+int
ruby_stack_check(void)
{
return stack_check(GET_THREAD(), STACKFRAME_FOR_CALL_CFUNC);