summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-15 05:50:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-15 05:50:10 +0000
commite5b968f5719b68e81421f362085320e2d2a1c36f (patch)
tree92932e87c071c013480ed1266a04d985f801c220 /thread.c
parente9614f9a37cee98a2addcffed1ae5111f97ad5d9 (diff)
thread.c: use ec
* thread.c (call_without_gvl): use execution context for RUBY_VM_CHECK_INTS_BLOCKING. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thread.c b/thread.c
index bfa903c6a4..912462e211 100644
--- a/thread.c
+++ b/thread.c
@@ -1309,8 +1309,8 @@ call_without_gvl(void *(*func)(void *), void *data1,
rb_unblock_function_t *ubf, void *data2, int fail_if_interrupted)
{
void *val = 0;
-
- rb_thread_t *th = GET_THREAD();
+ rb_execution_context_t *ec = GET_EC();
+ rb_thread_t *th = rb_ec_thread_ptr(ec);
int saved_errno = 0;
if (ubf == RUBY_UBF_IO || ubf == RUBY_UBF_PROCESS) {
@@ -1324,7 +1324,7 @@ call_without_gvl(void *(*func)(void *), void *data1,
}, ubf, data2, fail_if_interrupted);
if (!fail_if_interrupted) {
- RUBY_VM_CHECK_INTS_BLOCKING(th->ec);
+ RUBY_VM_CHECK_INTS_BLOCKING(ec);
}
errno = saved_errno;