diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-19 20:16:15 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-19 20:16:15 +0000 |
commit | 883422b19141ca21fcbfa7ae14e70c6f99ca17e1 (patch) | |
tree | a34c9b2a95d63082cb2876959598ea896ff7ad1c /thread_sync.c | |
parent | 6343dd4a036f5cce6f322917d7b2cbab0b5f8b60 (diff) |
thread_sync.rb (rb_condvar_wait): golf out unnecessary variables
GCC is smart enough to optimize these away, but my attention
span is too short :{
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/thread_sync.c b/thread_sync.c index 5e511af0db..19f14fa958 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -1383,14 +1383,11 @@ static VALUE rb_condvar_wait(int argc, VALUE *argv, VALUE self) { struct rb_condvar *cv = condvar_ptr(self); - VALUE mutex, timeout; struct sleep_call args; struct sync_waiter w; - rb_scan_args(argc, argv, "11", &mutex, &timeout); + rb_scan_args(argc, argv, "11", &args.mutex, &args.timeout); - args.mutex = mutex; - args.timeout = timeout; w.th = GET_THREAD(); list_add_tail(&cv->waitq, &w.node); rb_ensure(do_sleep, (VALUE)&args, delete_from_waitq, (VALUE)&w); |