aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
Commit message (Collapse)AuthorAgeFilesLines
* Add clang volatile fixes from FreeBSD and NetBSD.shugo2016-12-071-2/+2
| | | | | | | | Use volatile instead of optnone to avoid optimization which causes segmentation faults. Patch by Dimitry Andric. [ruby-core:78531] [Bug #13014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: fix doc of abort_on_exception [ci skip]nobu2016-11-291-7/+6
| | | | | | | | | | | * thread.c (rb_thread_s_abort_exc, rb_thread_s_abort_exc_set): [DOC] the raised exception will be re-raised in the main thread, and then follows the ordinary exception sequence, exit status is not 0. [ruby-core:78415] [Bug #12991] * thread.c (rb_thread_abort_exc_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (tracepoint_attr_callee_id, rb_tracearg_callee_id):ktsj2016-11-051-3/+3
| | | | | | | | | | | add TracePoint#callee_id. [ruby-core:77241] [Feature #12747] * cont.c, eval.c, gc.c, include/ruby/intern.h, insns.def, thread.c, vm.c, vm_backtrace.c, vm_core.h, vm_eval.c, vm_insnhelper.c, vm_trace.c: ditto. * test/ruby/test_settracefunc.rb: tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: check coverage valuesnobu2016-10-061-1/+4
| | | | | | | * thread.c (update_coverage): check coverage values, and ignore non-fixnum values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (WARN_UNUSED_RESULT): moved to configure.in, toshyouhei2016-09-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | actually check its availability rather to check GCC's version. * configure.in (WARN_UNUSED_RESULT): moved to here. * configure.in (RUBY_FUNC_ATTRIBUTE): change function declaration to return int rather than void, because it makes no sense for a warn_unused_result attributed function to return void. Funny thing however is that it also makes no sense for noreturn attributed function to return int. So there is a fundamental conflict between them. While I tested this, I confirmed both GCC 6 and Clang 3.8 prefers int over void to correctly detect necessary attributes under this setup. Maybe subject to change in future. * internal.h (UNINITIALIZED_VAR): renamed to MAYBE_UNUSED, then moved to configure.in for the same reason we move WARN_UNUSED_RESULT. * configure.in (MAYBE_UNUSED): moved to here. * internal.h (__has_attribute): deleted, because it has no use now. * string.c (rb_str_enumerate_lines): refactor macro rename. * string.c (rb_str_enumerate_bytes): ditto. * string.c (rb_str_enumerate_chars): ditto. * string.c (rb_str_enumerate_codepoints): ditto. * thread.c (do_select): ditto. * vm_backtrace.c (rb_debug_inspector_open): ditto. * vsnprintf.c (BSD_vfprintf): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: set cause by Thread#raisenobu2016-09-091-0/+3
| | | | | | | | * thread.c (rb_threadptr_raise): set cause from the called thread, but not from the thread to be interrupted. [ruby-core:77222] [Bug #12741] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: revisit the structure of frame, block and env.ko12016-07-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | [Bug #12628] This patch introduce many changes. * Introduce concept of "Block Handler (BH)" to represent passed blocks. * move rb_control_frame_t::flag to ep[0] (as a special local variable). This flags represents not only frame type, but also env flags such as escaped. * rename `rb_block_t` to `struct rb_block`. * Make Proc, Binding and RubyVM::Env objects wb-protected. Check [Bug #12628] for more details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c: Fixed implicit conversion error with Apple clang-800.0.31hsbt2016-07-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_wait_for_single_fd): Clean up fds.revents every timengoto2016-07-081-0/+1
| | | | | | | before calling ppoll(2). [Bug #12575] [ruby-dev:49725] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: fix thread_id formattingnobu2016-06-151-10/+6
| | | | | | | * thread.c (debug_deadlock_check): fix format specifier for thread_id, which may not be a pointer, nor even a scalar value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (debug_deadlock_check): show thread lock dependency andnaruse2016-06-131-13/+33
| | | | | | | | | backtrace [Feature #8214] [ruby-dev:47217] * thread.c (thread_status_name): show "sleep_forever" instead of "sleep" if called from inspect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Thread.report_on_exceptionnobu2016-06-061-0/+123
| | | | | | | * thread.c (thread_start_func_2): report raised exception if report_on_exception flag is set. [Feature #6647] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (recursive_list_access): a object id may be a Bignum. so,usa2016-05-181-1/+1
| | | | | | | | the list must be a objhash, instead of a identhash. this fixes many test errors on mswin64 CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: GET_THREAD once in rb_thread_atforknobu2016-05-091-5/+6
| | | | | | | * thread.c (rb_thread_atfork_internal): move th to an argument. * thread.c (rb_thread_atfork): do not repeat GET_THREAD(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: clear atfork functionsnobu2016-05-091-0/+12
| | | | | | | | | | | | * thread.c (rb_thread_atfork, rb_thread_atfork_before_exec): do nothing unless working fork is available. * thread_sync.c (rb_mutex_abandon_all): define only if working fork is available. * thread_sync.c (rb_mutex_abandon_keeping_mutexes): ditto. * thread_sync.c (rb_mutex_abandon_locking_mutex): ditto. * thread_win32.c (gvl_init): never used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: add -Wsuggest-attribute=noreturn and suppress warnings.naruse2016-05-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use TH_JUMP_TAGnobu2016-05-051-2/+2
| | | | | | | | * vm_eval.c (rb_eval_cmd, rb_catch_obj): use TH_JUMP_TAG with the same rb_thread_t used for TH_PUSH_TAG, instead of JUMP_TAG with the current thread global variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: defer setting name in initializenobu2016-04-151-15/+13
| | | | | | | | * thread.c (rb_thread_setname): defer setting native thread name set in initialize until the native thread is created. [ruby-core:74963] [Bug #12290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: must be initialized to set namenobu2016-04-151-9/+15
| | | | | | | | | * thread.c (get_initialized_threadptr): extract ensuring that the thread is initialized. * thread.c (rb_thread_setname): thread must be initialized to set the name. [ruby-core:74963] [Bug #12290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/coverage/coverage.c: Fully reset coverage to not persist global state.eregon2016-04-061-0/+11
| | | | | | | | | | It was returning old file coverages as empty arrays to the user. [ruby-core:74596] [Bug #12220] * ext/coverage/coverage.c (rb_coverages): remove unused static state. * thread.c: Moved and renamed coverage_clear_result_i to reset_coverage_i. * test/coverage/test_coverage.rb: improve precision of tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (update_coverage): Do not track coverage in loaded fileseregon2016-03-311-1/+1
| | | | | | | after Coverage.result. Avoids out-of-bounds access. [Bug #12237] * ext/coverage/coverage.c (coverage_clear_result_i): document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: check type of coveragenobu2016-03-101-1/+1
| | | | | | | * thread.c (update_coverage): check type of coverage array not only if non-zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: interrupt queue on uninitialized threadnobu2016-01-071-0/+13
| | | | | | | | | * thread.c (rb_thread_pending_interrupt_p): no pending interrupt before initialization. * thread.c (thread_raise_m, rb_thread_kill): uninitialized thread cannot interrupt. [ruby-core:72732] [Bug #11959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * *.c (*_memsize): do not check ptr.ko12015-12-091-1/+1
| | | | | | | | | | NULL checking is finished Before call of memsize functions. See r52979. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: name must be ascii-compatiblenobu2015-12-041-0/+6
| | | | | | | * thread.c (rb_thread_setname): name must be ascii-compatible, as pthread APIs do not accept legacy wide char strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: split SET_THREAD_NAMEnobu2015-12-031-12/+4
| | | | | | | | | | | | * configure.in: separate SET_CURRENT_THREAD_NAME, which can set the name of current thread only, and SET_ANOTHER_THREAD_NAME, which can set the name of other threads. * thread.c (rb_thread_setname): use SET_ANOTHER_THREAD_NAME. OS X is not possible to set another thread name. * thread_pthread.c (native_set_thread_name, thread_timer): use SET_CURRENT_THREAD_NAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: rb_thread_setname on OS Xnobu2015-12-021-0/+6
| | | | | | | * thread.c (rb_thread_setname): pthread_setname_np() on OS X takes the name only and sets the current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.h: introduce ISEQ_COVERAGE() and ISEQ_COVERAGE_SET() macro.ko12015-12-021-1/+1
| | | | | | | | | | | | | | | | | * compile.c: use them. * iseq.c: ditto. * iseq.c (rb_iseq_coverage): added. * thread.c (update_coverage): use rb_iseq_coverage(). * vm_core.h: rename coverage field name to support this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: reset namenobu2015-12-011-5/+10
| | | | | | * thread.c (rb_thread_setname): allow to reset thread name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: check name argumentnobu2015-12-011-0/+1
| | | | | | | * thread.c (rb_thread_setname): check the argument if valid string. [ruby-core:71774] [Bug #11756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (register_ubf_list): renamed fromkosaki2015-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | add_signal_thread_list. * thread_pthread.c (unregister_ubf_list): renamed from remove_signal_thread_list. * thread_pthread.c (ubf_wakeup_all_threads): renamed from ping_signal_thread_list. * thread_pthread.c (ubf_wakeup_thread): renamed from ubf_select_each. * thread_pthread.c (ubf_threads_empty): renamed from check_signal_thread_list(). * thread_pthread.c (ubf_list_lock): renamed from signal_thread_list_lock. * thread_pthread.c (register_ubf_list): large simplification by using ccan/list.h. bonus: removed malloc() and exit(EXIT_FAILURE). * thread_pthread.c (unregister_ubf_list): ditto. * thread_pthread.c (ubf_threads_empty): ditto. * thread_pthread.c (ubf_wakeup_all_threads): ditto. * thread_pthread.c (print_signal_list): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (rb_cThreadShield): make staticnormal2015-11-071-1/+1
| | | | | | | Nothing outside of thread.c accesses this variable, so avoid cluttering up the global namespace with it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: suppress warnings only if GCC6+nobu2015-09-181-0/+2
| | | | | | | * thread.c (rb_fd_no_init): suppress warnings by applying ASSUME only if GCC 6 or lator, to get rid of freeze with GCC 4.7.2-5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: no wait when killednobu2015-09-081-0/+12
| | | | | | | * io.c (rb_io_s_popen): do not wait the child process during being killed. [ruby-core:70671] [Bug #11510] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: suppress warningsnobu2015-09-061-12/+17
| | | | | | | * thread.c (do_select): suppress maybe-uninitialized warnings on maxfd. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_tools.c: rename thread_tools.c to thread_sync.c.ko12015-09-011-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/thread/thread.c: move definitions of Queue, SizedQueueko12015-08-211-521/+4
| | | | | | | | | | | | | | | | | | | | | and ConditionalVariables to thread_tools.c. In other wowrds, such classes are built-in. [Feature #8919] At first, I planned to embed only a Queue class. However, rubygems requires 'thread.rb' (rubygems are required at first, when launch MRI without --disable-gems). So most of people require 'thread.rb' as an embedded library. Now, ext/thread/thread.c is empty, only for a dummy for compatibility. * thread.c: move a definition of Mutex class to thread_tools.c. And define Mutex class under Thread (so now Mutex is Thread::Mutex). Because other thread related classes are also defined under Thread. We remain ::Mutex as Thread::Mutex. Only an inspect result is changed. * common.mk: add dependency from thread.o to thraed_tools.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* improve handling of timer thread shutdownnormal2015-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shutting down the timer thread now always closes pipes to free FDs. In fact, we close the write ends of the pipes is done in the main RubyVM to signal the timer thread shutdown. To effectively close pipes, we implement userspace locks via atomics to force the pipe closing thread to wait on any signal handlers which may be waking up. While we're at it, improve robustness during resource exhaustion and allow it to limp along non-fatally if restarting a timer thread fails. This reverts r51268 Note: this change is tested with VM_CHECK_MODE 1 in vm_core.h * process.c (close_unless_reserved): add extra check (dup2_with_divert): remove (redirect_dup2): use dup2 without divert (before_exec_non_async_signal_safe): adjust call + comment (rb_f_exec): stop timer thread for all OSes (rb_exec_without_timer_thread): remove * eval.c (ruby_cleanup): adjust call * thread.c (rb_thread_stop_timer_thread): always close pipes * thread_pthread.c (struct timer_thread_pipe): add writing field, mark owner_process volatile for signal handlers (rb_thread_wakeup_timer_thread_fd): check valid FD (rb_thread_wakeup_timer_thread): set writing flag to prevent close (rb_thread_wakeup_timer_thread_low): ditto (CLOSE_INVALIDATE): new macro (close_invalidate): new function (close_communication_pipe): removed (setup_communication_pipe_internal): make errors non-fatal (setup_communication_pipe): ditto (thread_timer): close reading ends inside timer thread (rb_thread_create_timer_thread): make errors non-fatal (native_stop_timer_thread): close write ends only, always, wait for signal handlers to finish (rb_divert_reserved_fd): remove * thread_win32.c (native_stop_timer_thread): adjust (untested) (rb_divert_reserved_fd): remove * vm_core.h: adjust prototype git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: freeze masksnobu2015-08-131-0/+2
| | | | | | | * thread.c (rb_thread_s_handle_interrupt, rb_uninterruptible): freeze mask hashes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: fix messagenobu2015-08-031-1/+1
| | | | | | | * thread.c (thread_shield_get_mutex): fix object to be shown in the message, NULL pointer is useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: thread_shield_get_mutexnobu2015-08-011-2/+11
| | | | | | | * thread.c (thread_shield_get_mutex): explicitly check if destroyed already. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: identity hashnobu2015-07-301-1/+1
| | | | | | * thread.c (rb_uninterruptible): use identity hash for masking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: identical hashnobu2015-07-301-3/+14
| | | | | | | * thread.c (rb_thread_s_handle_interrupt): make identical hash, to compare masking classes just by their IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: separate rb_iseq_body into rb_iseq_constant_body andko12015-07-221-1/+1
| | | | | | | | | | | | rb_iseq_variable_body (rb_iseq_t::variable_body). rb_iseq_variable_body can be modified after compilation. * compile.c: use rb_iseq_t::variable_body. * iseq.c: ditto. * thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: return the errornobu2015-07-221-0/+1
| | | | | | | * thread.c (rb_wait_for_single_fd): return the error when ppoll failed. fix r51319. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * make rb_iseq_t T_IMEMO object (type is imemo_iseq).ko12015-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All contents of previous rb_iseq_t is in rb_iseq_t::body. Remove rb_iseq_t::self because rb_iseq_t is an object. RubyVM::InstructionSequence is wrapper object points T_IMEMO/iseq. So RubyVM::ISeq.of(something) method returns different wrapper objects but they point the same T_IMEMO/iseq object. This patch is big, but most of difference is replacement of iseq->xxx to iseq->body->xxx. (previous) rb_iseq_t::compile_data is also located to rb_iseq_t::compile_data. It was moved from rb_iseq_body::compile_data. Now rb_iseq_t has empty two pointers. I will split rb_iseq_body data into static data and dynamic data. * compile.c: rename some functions/macros. Now, we don't need to separate iseq and iseqval (only VALUE). * eval.c (ruby_exec_internal): `n' is rb_iseq_t (T_IMEMO/iseq). * ext/objspace/objspace.c (count_imemo_objects): count T_IMEMO/iseq. * gc.c: check T_IMEMO/iseq. * internal.h: add imemo_type::imemo_iseq. * iseq.c: define RubyVM::InstructionSequnce as T_OBJECT. Methods are implemented by functions named iseqw_.... * load.c (rb_load_internal0): rb_iseq_new_top() returns rb_iseq_t (T_IMEMO/iesq). * method.h (rb_add_method_iseq): accept rb_iseq_t (T_IMEMO/iseq). * vm_core.h (GetISeqPtr): removed because it is not T_DATA now. * vm_core.h (struct rb_iseq_body): remove padding for [Bug #10037][ruby-core:63721]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: refactor a loopnobu2015-07-211-81/+78
| | | | | | | | * thread.c (do_select): replace switch and goto with a loop to suppress maybe-uninitialized warnings by gcc6. * thread.c (set_unblock_function, rb_wait_for_single_fd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: reuse tagnobu2015-07-201-17/+20
| | | | | | | * thread.c (rb_thread_terminate_all): reuse the tag pushed before a loop, instead of pushing/popping same tag repeatedly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: fix timeout limitnobu2015-07-191-5/+5
| | | | | | | * thread.c (ppoll): fix the limit, timeout argument of poll(2) is an int but not a time_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: gather common statementsnobu2015-07-181-5/+5
| | | | | | | * thread.c (vm_check_ints_blocking): gather common statements at the end, and prefer LIKELY for Visual C optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e