summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-16 20:42:43 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-16 20:42:43 (GMT)
commit4fd244358016913ccb4e2e6840ea8dc3459c4fb7 (patch)
treec120482753ed7da03cb06d68d6d077bcf1a10cad /process.c
parent5d59a808ced5fd56e5a5f341c7ce922f27f1877d (diff)
avoid redundant GET_THREAD() calls
This reduces binary size slightly on my 32-bit system: text data bss dec hex filename 2847705 12360 30632 2890697 2c1bc9 ruby.orig 2847641 12360 30632 2890633 2c1b89 ruby * iseq.c (rb_iseq_compile_with_option): reuse result of previous GET_THREAD() call * thread.c (thread_create_core): ditto (rb_mutex_trylock): ditto (rb_mutex_lock): ditto * process.c (rb_waitpid): avoid multiple eval from RUBY_VM_CHECK_INTS * thread.c (rb_thread_check_ints): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process.c b/process.c
index daf2eab..5643c09 100644
--- a/process.c
+++ b/process.c
@@ -887,7 +887,8 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
RUBY_UBF_PROCESS, 0);
if (result < 0) {
if (errno == EINTR) {
- RUBY_VM_CHECK_INTS(GET_THREAD());
+ rb_thread_t *th = GET_THREAD();
+ RUBY_VM_CHECK_INTS(th);
goto retry;
}
return (rb_pid_t)-1;