aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * thread_pthread.c (native_cond_timedwait): add to care EINTR.kosaki2011-05-082-3/+20
| | | | | | | | * thread_pthread.c (thread_timer): remove EINTR check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (xmlschema): avoid passing any negative numbers.tadf2011-05-082-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_{parse,strptime}.c: introduced some macros.tadf2011-05-083-10/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r31474. we cann't call xmalloc under FGLOCK.kosaki2011-05-082-9/+2
| | | | | | | | Thansk, nagachika-san. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date/*.rb: use skip /w messages.tadf2011-05-085-26/+30
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/lib/date/format.rb (_httpdate): omitted to call zone_to_diff.tadf2011-05-082-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c (date_s_test_*): use macros.tadf2011-05-082-24/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2011-05-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (add_signal_thread_list): use xmalloc insteadkosaki2011-05-082-2/+9
| | | | | | | | | | of malloc. * thread_pthread.c (remove_signal_thread_list): use xfree instead of free. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c: cleanup signal_thread_list related ifdef.kosaki2011-05-082-42/+52
| | | | | | | | | 1) we don't have to use #ifdef FOO-PLATFORM directly 2) About half #ifdef didn't care symbian properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb: Linux socketpair(2) only supportkosaki2011-05-072-1/+11
| | | | | | | | | AF_UNIX, but windows socketpair doesn't support it. we can't avoid platform check. sigh! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-05-08svn2011-05-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb: use Socket.pair instaed of pipe.kosaki2011-05-072-11/+5
| | | | | | | | Windows can only treat a socket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb: skip tests if the platform iskosaki2011-05-072-0/+12
| | | | | | | | mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_readpartial_lock),nobu2011-05-071-2/+2
| | | | | | (TestIO#test_read_lock): get rid of GVL fairness problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_fd_zero): remove redundant zero fill.kosaki2011-05-072-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_fd_init): remove volatile qualifier.kosaki2011-05-073-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_fd_init_copy): new internal api. It provide efficientkosaki2011-05-073-12/+32
| | | | | | | | | copy constructor semantics. * thread.c (do_select): use rb_fd_init_copy(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* r31460 is wrong fix. fix it again.kosaki2011-05-072-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2011-05-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (USE_MONOTONIC_COND): check the availabilitynobu2011-05-073-3/+15
| | | | | | | more strictly. * thread_pthread.h (rb_thread_cond_t): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove debugging codekosaki2011-05-071-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix incorrect native_cond_signal call when deadlock was detected.kosaki2011-05-072-2/+8
| | | | | | | | | * thread.c (lock_func): timedwait don't touch cond_waiting and cond_notifid variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix win32 native_cond_timedwait() makes SIGSEGV.kosaki2011-05-073-17/+48
| | | | | | | | | | | | | | | | | | * thread_win32.h (rb_thread_cond_struct): add prev field instead of last. (ie cond_event_entry is now using double linked list instead of single) * thread_win32.c (cond_event_entry): add prev field. * thread_win32.c (__cond_timedwait): remove entry properly if timeout was happen. * thread_win32.c (native_cond_signal): change for double linked list. * thread_win32.c (native_cond_broadcast): ditto. * thread_win32.c (native_cond_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix mutex deadlock test hang-up.kosaki2011-05-072-1/+7
| | | | | | | | | * thread_win32.c (abs_timespec_to_timeout_ms): fix 1000x calculation mistake. (ie fix hang-up native_cond_timedwait()) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sleep_cond use monotonic time if possible.kosaki2011-05-063-36/+75
| | | | | | | | | | | | | * thread_pthread.c (native_thread_init): change sleep_cond attribute to monotonic. * thread_pthread.c (native_sleep): use native_cond_timeout(). * thread_pthread.c (native_cond_timeout): add overflow care. * thread_win32.c (native_cond_timeout): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2011-05-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix win32 compile error.kosaki2011-05-063-1/+11
| | | | | | | | | | * thread_win32.c (RB_CONDATTR_CLOCK_MONOTONIC): define RB_CONDATTR_CLOCK_MONOTONIC always. * thread_pthread.c (RB_CONDATTR_CLOCK_MONOTONIC): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mutex: deadlock check timeout use monotonic time.kosaki2011-05-064-62/+92
| | | | | | | | | | | | | | | | | * thread_pthread.c (native_cond_timeout): new internal api. it calculate a proper time for argument of native_cond_timedwait(). * thread_win32.c (native_cond_timeout): ditto. * thread_pthread.c (thread_timer): use native_cond_timeout() instead of get_ts. * thread.c (lock_func): ditto. * thread_pthread.c (get_ts): removed. use native_cond_timeout(). * thread.c (init_lock_timeout): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (get_ts): add monotonic clock capability.kosaki2011-05-062-3/+28
| | | | | | | | | * thread_pthread.c (rb_thread_create_timer_thread): use monotonic clock if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-05-07svn2011-05-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.h (rb_thread_cond_t): add clockid field. it'skosaki2011-05-066-37/+79
| | | | | | | | | | | | | no longer an alias of pthread_cond_t. * thread_pthread.c: adapt new rb_thread_cond_t type. * thread.c (mutex_alloc): ditto. * thread_win32.c (native_cond_initialize): ditto. * configure.in: add check for pthread_cond_attr_setclock() and clockid_t type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_wait_for_single_fd): use ppoll() instead of poll()kosaki2011-05-063-10/+57
| | | | | | | | if possible. based on a patch from Eric Wong. [ruby-core:36003]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: remove nanosleep check. we no longer use it.kosaki2011-05-062-7/+6
| | | | | | | | r20124 removed last usage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* set properties.nobu2011-05-060-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (mktime_do): extra digits are not used.nobu2011-05-063-9/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (mktime_do): remove unused variable offset.naruse2011-05-063-2/+7
| | | | | | * ext/syck/syck.h: use #ifdef instead of #if DEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c (DAY_IN_NANOSECONDS): refix: 31438.naruse2011-05-062-2/+8
| | | | | | | check with LONG_MAX and cast as long; without this the calculation will be done as int and overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-05-06svn2011-05-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (mktime_do): avoid buffer overrun, byshyouhei2011-05-062-6/+14
| | | | | | | | | | | | | | | | | | silently ignoring lesser significant digits. Required buffer length can be computable so you might at first think of allocating enough memory space on the fly using alloca(). That is a wrong idea because when using alloca there is always risk of integer overflow. A function that accepts outer-process resources like this should not blindly trust its inputs. In this particular case we just want to generate miliseconds resolution by strtod() so the string in question needs no more length than what we originally have. Ignoring lesser significant digits should suffice I believe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog for itshyouhei2011-05-061-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* YAML.load time correctly parse usecs smaller than 1 fixes #4571shyouhei2011-05-061-10/+17
| | | | | | | | Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): fix false positivekosaki2011-05-052-19/+44
| | | | | | | | detection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (native_mutex_reinitialize_atfork): removedkosaki2011-05-053-7/+6
| | | | | | | | | unused macro. * thread_win32.c (native_mutex_reinitialize_atfork): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c (DAY_IN_NANOSECONDS): long long int is notnobu2011-05-052-2/+13
| | | | | | available on all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (frame_func_id): store result of method_entry_of_iseq() tonagachika2011-05-052-0/+6
| | | | | | cfp->me because method_entry_of_iseq() might become expensive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (frame_func_id): __method__ return different name fromnagachika2011-05-053-2/+56
| | | | | | | | | | methods defined by Module#define_method with a same block. [ruby-core:35386] fixes #4606 * eval (method_entry_of_iseq): new helper function. search control frame stack for a method entry which has given iseq. * test/ruby/test_method.rb: add tests for #4696 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-05-05svn2011-05-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix capture to avoid doing a sub on the useconds when parsing datestenderlove2011-05-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bm_vm4_pipe.rb: Reduced iterations. Too slow benchmarkkosaki2011-05-043-2/+8
| | | | | | | | | is bad. * benchmark/bm_vm4_thread_pass.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e