summaryrefslogtreecommitdiff
path: root/thread.c
AgeCommit message (Collapse)Author
2014-02-14* include/ruby/intern.h,akr
include/ruby/io.h, include/ruby/ruby.h, include/ruby/win32.h, include/ruby/backward/rubysig.h, bignum.c, gc.c, io.c, process.c, safe.c, struct.c, thread.c, ext/socket/rubysocket.h, ext/-test-/old_thread_select: Remove deprecated definitions [ruby-core:60581] [Feature #9502] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28vm_core.h: rb_thread_struct::machinenobu
* vm_core.h (rb_thread_struct): aggregate cpu stuff into a struct, so that a debugger can show its content at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13thread.c: reduce tags and stacknobu
* thread.c: (exec_recursive): use rb_catch_protect() instead of rb_catch_obj() and PUSH_TAG(), and reduce pushing tags and machine stack usage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06thread.c: compare_by_idnobu
* thread.c (recursive_list_access): let symbol only hashes compare the elements by id. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLISTnobu
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration argument list of rb_block_call_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29ruby/ruby.h: add blockarg to rb_block_call_funcnobu
* include/ruby/ruby.h (rb_block_call_func): add blockarg. block function can take block argument, e.g., proc {|&blockarg| ...}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-16* thread_pthread.c (thread_create_core): Ditto.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09* thread.c: [DOC] Remove duplicate referencezzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-31* thread.c (rb_mutex_struct): reduce rb_mutex_t size by 8 byteskosaki
on 64bit platform. Patch by Eric Wong. [Feature #9068][ruby-core:58114] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko1
safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-24* thread.c (rb_thread_terminate_all): add a comment why we needkosaki
state check and call terminate_i again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-24* thread.c (rb_thread_terminate_all): add a comment why infinitekosaki
sleep is safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* vm_trace.c: exterminate Zombies.ko1
There is a bug that T_ZOMBIE objects are not collected. Because there is a pass to miss finalizer postponed job with multi-threading. This patch solve this issue. * vm_trace.c (rb_postponed_job_register_one): set RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job is registered. There is a possibility to remain a postponed job without interrupt flag. * vm_trace.c (rb_postponed_job_register_one): check interrupt carefully. * vm_trace.c (rb_postponed_job_register_one): use additional space to avoid buffer full. * gc.c (gc_finalize_deferred_register): check failure. * thread.c (rb_threadptr_execute_interrupts): check `postponed_job_interrupt' immediately. There is a possibility to miss this flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10vm_trace.c: fix infinite hooknobu
* thread.c (rb_threadptr_execute_interrupts): flush postponed job only once at last. * vm_trace.c (rb_postponed_job_flush): defer calling postponed jobs registered while flushing to get rid of infinite reentrance of ObjectSpace.after_gc_start_hook. [ruby-dev:47400] [Bug #8492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09compar.c: fail if recursionnobu
* compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003] * thread.c (rb_exec_recursive_paired_outer): new function which is combinnation of paired and outer variants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-05thread.c: fix some mutexes remaining locked after forkingnobu
* thread.c (terminate_atfork_i): fix locking mutexes not unlocked in forks when not tracked in thread. [ruby-core:55102] [Bug #8433] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-25* include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().ko1
RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and usecase of this macro is not acquire raw pointer, but acquire read-only pointer. So we rename to better name. RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR() (I expect that nobody use it). * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c, string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-10* thread.c (rb_mutex_unlock): Mutex#unlock no longer raisekosaki
an exception even if uses on trap. [Bug #8891] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06* common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can'tglass
require extension libraries. The patch is from nobu (Nobuyoshi Nakada). * ext/thread/extconf.rb: for build ext/thread/thread.c. * include/ruby/intern.h: ditto. * thread.c: ditto. * lib/thread.rb: removed and replaced by ext/thread/thread.c. * ext/thread/thread.c: Queue, SizedQueue and ConditionVariable implementations in C. This patch is based on patches from panaggio (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and ko1 (Koichi Sasada). [ruby-core:31513] [Feature #3620] * test/thread/test_queue.rb (test_queue_thread_raise): add a test for ensuring that killed thread should be removed from waiting threads. It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18* error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:ktsj
$SAFE=4 is obsolete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08* thread.c (rb_threadptr_pending_interrupt_check_mask):ko1
use RARRAY_RAWPTR() instead of RARRAY_PTR() because there is no new reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07* thread.c (thread_start_func_2): use RARRAY_RAWPTR() instead ofko1
RARRAY_PTR() because there is no new reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23* thread_(pthread|win32).h: rename rb_thread_cond_t toko1
rb_nativethread_cond_t. * thread.c, thread_pthread.c, thread_win32.c, vm_core.h: catch up renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23* thread_native.h: added.ko1
Move native thread related lines from vm_core.h. And declare several functions "rb_nativethread_lock_*", manipulate locking. * common.mk: add thread_native.h. * thread.c: add functions "rb_nativethread_lock_*". * thraed.c, thread_[pthread,win32].[ch]: rename rb_thread_lock_t to rb_nativethread_lock_t to make it clear that this lock is for native thraeds, not for ruby threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-15* thread.c (mutex_sleep): [DOC] Awake thread will reacquire lockzzak
By Tim Abdulla [Fixes GH-342] https://github.com/ruby/ruby/pull/342 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-02internal.h: use built-in encoding indexesnobu
* internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in encoding indexes for optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* include/ruby/ruby.h, gc.c, vm_trace.c: add internal events.ko1
* RUBY_INTERNAL_EVENT_NEWOBJ: object created. * RUBY_INTERNAL_EVENT_FREE: object freeed. * RUBY_INTERNAL_EVENT_GC_START: GC started. And rename `RUBY_EVENT_SWITCH' to `RUBY_INTERNAL_EVENT_SWITCH'. Internal events can not invoke any Ruby program because the tracing timing may be critical (under huge restriction). These events can be hooked only by C-extensions. We recommend to use rb_potponed_job_register() API to call Ruby program safely. This change is mostly written by Aman Gupta (tmm1). https://bugs.ruby-lang.org/issues/8107#note-12 [Feature #8107] * include/ruby/debug.h, vm_trace.c: added two new APIs. * rb_tracearg_event_flag() returns rb_event_flag_t of this event. * rb_tracearg_object() returns created/freeed object. * ext/-test-/tracepoint/extconf.rb, ext/-test-/tracepoint/tracepoint.c, test/-ext-/tracepoint/test_tracepoint.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26* include/ruby/debug.h, vm_trace.c: add rb_postponed_job API.ko1
Postponed jobs are registered with this API. Registered jobs are invoked at `ruby-running-safe-point' as soon as possible. This timing is completely same as finalizer timing. There are two APIs: * rb_postponed_job_register(flags, func, data): register a postponed job with data. flags are reserved. * rb_postponed_job_register_one(flags, func, data): same as `rb_postponed_job_register', but only one `func' job is registered (skip if `func' is already registered). This change is mostly written by Aman Gupta (tmm1). https://bugs.ruby-lang.org/issues/8107#note-15 [Feature #8107] * gc.c: use postponed job API for finalizer. * common.mk: add dependency from vm_trace.c to debug.h. * ext/-test-/postponed_job/extconf.rb, postponed_job.c, test/-ext-/postponed_job/test_postponed_job.rb: add a test. * thread.c: implement postponed API. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26* hash.c (rb_hash_tbl_raw), internal.h: added.ko1
Returns st_table without shading hash. * array.c: use rb_hash_tbl_raw() for read-only purpose. * compile.c (iseq_compile_each): ditto. * gc.c (count_objects): ditto. * insns.def: ditto. * process.c: ditto. * thread.c (clear_coverage): ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos. Patch by k_takata.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02thread.c: id localsnobu
* thread.c (id_locals): use cached ID. * vm.c (ruby_thread_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-29Add comments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27* thread.c: fix typos and documentationeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27* internal.h (SIGNED_INTEGER_TYPE_P): New macro.akr
(SIGNED_INTEGER_MAX): Ditto. (SIGNED_INTEGER_MIN): Ditto. (UNSIGNED_INTEGER_MAX): Ditto. (TIMET_MAX): Use SIGNED_INTEGER_MAX and UNSIGNED_INTEGER_MAX. (TIMET_MIN): Use SIGNED_INTEGER_MIN. * thread.c (TIMEVAL_SEC_MAX): Use SIGNED_INTEGER_MAX. (TIMEVAL_SEC_MIN): Use SIGNED_INTEGER_MIN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27* thread.c (TIMEVAL_SEC_MAX, TIMEVAL_SEC_MIN): Consider environments,akr
sizeof(time_t) is smaller than sizeof(tv_sec), such as OpenBSD 5.2 (amd64). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-17thread.c: fix overflow on Windowsnobu
* thread.c (sleep_timeval): get rid of overflow on Windows where timeval.tv_sec is not time_t but mere long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-09* internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.akr
(MUL_OVERFLOW_FIXNUM_P): Ditto. (MUL_OVERFLOW_LONG_P): Ditto. * array.c (rb_ary_product): Don't overflow on signed integer multiplication. * numeric.c (fix_mul): Ditto. (int_pow): Ditto. * rational.c (f_imul): Ditto. * insns.def (opt_mult): Ditto. * thread.c (sleep_timeval): Don't overflow on signed integer addition. * bignum.c (rb_int2big): Don't overflow on signed integer negation. (rb_big2ulong): Ditto. (rb_big2long): Ditto. (rb_big2ull): Ditto. (rb_big2ll): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-09Fix documentation by @jc00ke [fix GH-278]hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05thread.c: no allocate before deletingnobu
* thread.c (rb_thread_local_aset): no needs to allocate local_storage before deleting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04thread.c: avoid inadvertent symbol creationnobu
* thread.c (rb_thread_aref): avoid inadvertent symbol creation. (rb_thread_variable_get): ditto. (rb_thread_key_p): ditto. (rb_thread_variable_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04thread.c: error messagenobu
* thread.c (rb_thread_variable_get): fix error message. getter doesn't modify thread variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-30thread.c: TYPEOF_TIMEVAL_TV_SECnobu
* configure.in (TYPEOF_TIMEVAL_TV_SEC): check for x64-mingw, where timeval.tv_sec is not time_t. * thread.c (double2timeval): use TYPEOF_TIMEVAL_TV_SEC to get rid of overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-30timev.h: move time_t stuffsnobu
* timev.h (TYPEOF_TIMEVAL_TV_SEC, unsigned_time_t): move from time.c. * thread.c: use definitions in timev.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-30thread.c: format specifiers for time_tnobu
* thread.c (sleep_timeval): fix format specifiers for time_t. * time.c (DEBUG_REPORT_GUESSRANGE): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-29thread.c: Mutex#synchronize no block paramsnobu
* thread.c (rb_mutex_synchronize_m): yield no block params. patch by splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097]. fix GH-266. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-26* internal.h (TIMET_MAX_PLUS_ONE): Defined.akr
* thread.c (double2timeval): Saturate out-of-range values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-26* internal.h: Define TIMET_MAX and TIMET_MIN here.akr
* time.c: Remove TIMET_MAX and TIMET_MIN definitions. * thread.c: Ditto. * thread_pthread.c: Remove TIMET_MAX definition. * thread_win32.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e