summaryrefslogtreecommitdiff
path: root/thread_pthread.c
AgeCommit message (Collapse)Author
2009-04-12merges r22898 from trunk into ruby_1_9_1.yugui
-- * thread_pthread.c (ruby_init_stack): range of rlim_cur may be larger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04merges r22659 from trunk into ruby_1_9_1.yugui
-- * gc.c (ruby_get_stack_grow_direction): no needs to use thread here, and not initialized yet. [ruby-core:22439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20merges r21662 from trunk into ruby_1_9_1.yugui
* thread.c (rb_thread_execute_interrupts): needs rb_signal_buff_size to be declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04merges r21265 from trunk into ruby_1_9_1.yugui
* signal.c (rb_signal_buff_size): defined for check whether signal is in the buffer or not. * thread_pthread.c (thread_timer): don't exit the loop when signal is in the buffer. [ruby-dev:37637] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13merges r20593 from trunk into ruby_1_9_1.yugui
* compile.c (iseq_compile_each), gc.c (assign_heap_slot), (gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add), proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all), (thread_start_func_2, blocking_region_begin, blocking_region_end), (rb_thread_kill), thread_pthread.c (native_thread_create), (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state), (vm_call0): use void pointer for %p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30merges r20372-r20375 and r20380 from trunk into ruby_1_9_1.yugui
* signal.c (register_sigaltstack): minimum size is insufficient for method calls. * signal.c (sigsegv): handles stack overflow if possible. * thread.c (ruby_thread_stack_overflow): helper function to raise sysstack_error. * thread_pthread.c (ruby_stack_overflowed_p): checks for stack overflow. * signal.c (ruby_sigaction_t): added. * signal.c (register_sigaltstack): stores alt stack for debug purpose. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30* thread.c, thread_pthread.c, thread_win32.c: merges nobu's commits -yugui
r20117, r20123, r20124, r20127, r20132-r20134, r20138, r20140, r20141 and r20160 - from trunk into ruby_1_9_1. * thread_pthread.c (thread_timer): checks working flags again. * thread_pthread.c (rb_thread_create_timer_thread): do not wait never coming signal if failed to create tiemr thread. * thread_pthread.c (native_cond_timedwait): returns error code. * thread_pthread.c (thread_timer, rb_thread_create_timer_thread): handshakes properly. * thread_pthread.c (thread_timer): initializes mutex each time. * thread_win32.c (thread_start_func_1): use already gotten stack info. * thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT when timed out. * thread_pthread.c (thread_timer): uses pthread_cond_timedwait always instead of pthread_kill. * thread.c (thread_timer): uses timedwait on cygwin. * thread.c (rb_thread_stop_timer_thread): terminates timer thread immediately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* thread.c, vm_core.h: add manual priority supportko1
using time slice. if you enable USE_NATIVE_THREAD_PRIORITY macro, this mechanism is ignored. [ruby-dev:33124] * thread_pthread.c, thread_win32.c: ditto. * test/ruby/test_thread.rb: fix test parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08* configure.in (shutdown, sched_yield, pthread_attr_setinheritsched):nobu
check for Haiku. * eval_intern.h, io.c, thread_pthread.c: use autoconfisticated results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06* eval_intern.h: Add support to Haiku. see [ruby-core:18110]naruse
* include/ruby/defines.h: ditto. * configure.in: ditto. * thread_pthread.c: ditto. * io.c: ditto. * lib/mkmf.rb: ditto. * ext/socket/getaddrinfo.c: ditto. * ext/socket/extconf.rb: ditto. * ext/socket/socket.c: ditto. * ext/socket/addrinfo.h: ditto. * ext/socket/getnameinfo.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-16* thread.c (thread_start_func_2): wake up joining threads.nobu
* thread.c (sleep_forever, sleep_timeval): return when interrupted. [ruby-dev:35542] * thread.c (timer_thread_function): restore main thread status. [ruby-core:17270] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-09* thread.c (sleep_forever): wait until timed out. [ruby-core:17270]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-09* thread_{pthread,win32}.c (native_sleep): wait until timed out.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-09* thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs morenobu
stack for debug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-06* thread_pthread.c (ruby_init_stack): prior STACK_END_ADDRESS ifnobu
found. [ruby-core:17624] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-05* thread.c (thread_initialize): NUM2INT() returns int.nobu
* thread.c (timer_thread_function), thread_pthread.c (thread_timer), thread_win32.c (timer_thread_func), thread_{pthread,win32}.c (rb_thread_create_timer_thread): passing VM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17* thread_pthread.c (native_thread_init_stack): suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-14* gc.h (STACK_UPPER): moved from gc.cnobu
* thread.c, thread_{pthread,win32}.c (ruby_init_stack, ruby_thread_init_stack): moved stack initialization from gc.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-12* thread.c, vm_core.h, vm.c, thread_pthread.c, thread_win32.c: addmame
deadlock detection. [ruby-dev:35044] * bootstraptest/test_thread.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko1
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-30* vm_core.h (struct rb_unblock_callback), thread.cnobu
(set_unblock_function), thread_{pthread,win32}.c (native_sleep): extracted from struct rb_thread_struct. * thread.c (reset_unblock_function): not check interrupts at leaving blocking region. [ruby-dev:34874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* thread_pthread.c (native_thread_apply_priority):ko1
fix argument range check. [ruby-dev:33124] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17Kernel#.sleep used never to sleep on Mac OS X. Fixed it and added error checks.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* io.c (copy_stream_func): suppress warnings.nobu
* thread_pthread.c (add_signal_thread_list): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10* thread_pthread.c (native_sleep): sleep_cond is initialized atnobu
creation. [ruby-Patches-19361]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-18* thread.c (thread_cleanup_func): ignore errors from destroying mutexnobu
of dead thread. [ruby-core:15069] * thread_pthread.c, thread_win32.c (native_thread_destroy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-05unused variable removed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31* thread_pthread.c (native_sleep): timespec tv_sec may overflow onmatz
some platform. a patch from zunda <zunda616e AT yahoo.co.jp> in [ruby-dev:32904]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* thread_pthread.c, thread_pthread.h, thread_win32.c,ko1
thread_win32.c: make some functions static functions. a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp> in [ruby-core:14407] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* vm_core.h, thread.c, cont.c: add RUBY_VM_SET_INTERRUPT(),ko1
RUBY_VM_SET_TIMER_INTERRUPT(), RUBY_VM_INTERRUPTED(). * thread.c, thread_pthread.c, thread_win32.c: fix to ignore time slice event until sleep. * bootstraptest/test_thread.rb: add a test for time limited join test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* gc.h: extern variable should not be initialized.ko1
* thread_pthread.c: add a parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20* thread_pthread.c (native_thread_apply_priority): checkko1
_POSIX_PRIORITY_SCHEDULING for OpenBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20* common.mk, *.ci: renamed to *.c.ko1
* eval_laod.c: renamed to load.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e