summaryrefslogtreecommitdiff
path: root/thread.c
AgeCommit message (Collapse)Author
2008-06-15* vm_core.h, thread.c: rename global_interpreter_lock toko1
global_vm_lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17349 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 (mutex_unlock): fix cond_notified consistency.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17113 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-10* include/ruby/intern.h, proc.c: revert rb_proc_call() andko1
create rb_proc_call_with_block() instaed. * include/ruby/ruby.h, eval_jump.c, thread.c, vm_insnhelper.c: rb_blockptr should not be exposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h, vm_core.h: add a type rb_blockptr.mame
* vm_insnhelper.c (vm_yield_with_cfunc): vm_yield_with_cfunc receives blockptr and passes it to iterating block. * proc.c (rb_proc_call), include/ruby/intern.h: rb_proc_call receives blockptr. "rb_proc_call(self, args, blockptr)" in C corresponds to "self.call(*args, &block)" in Ruby. * proc.c (proc_call): pass blockptr to block that is written in C. * proc.c (curry): receive blockptr and pass it to original proc. [ruby-core:15551] * vm.c (invoke_block_from_c): fix for change of vm_yield_with_cfunc. * thread.c (call_trace_proc), eval_jump.c (rb_call_end_proc): fix for change of rb_proc_call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 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-06-05* eval.c (ruby_finalize_0): clear trace_func after executing ENDmame
procs. * thread.c: fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05* thread.c (thread_set_trace_func_m): fix check for proc argument.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01* suppress warnings on cygwin, mingw and mswin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 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-27* thread.c (rb_thread_execute_interrupts): delay interrupts duringnobu
raising exceptions. [ruby-dev:34855] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-11* thread.c (thread_cleanup_func_before_exec): extracted fromakr
thread_cleanup_func not to touch pthread data. pthread_cond_destroy in forked process may cause deadlock on Debian GNU/Linux Etch on x86, x86-64 and IA64. this doesn't cause resource leak because the process will exec soon. (terminate_atfork_before_exec_i): defined. (rb_thread_atfork_before_exec): defined. * include/ruby/intern.h (rb_thread_atfork_before_exec): declared. * process.c (rb_exec_atfork): call rb_thread_atfork_before_exec instead of rb_thread_atfork. * io.c (popen_exec): call rb_thread_atfork_before_exec instead of rb_thread_atfork. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-09* thread.c (timeofday): use monotonic clock. based on a patchmatz
from zimbatm <zimbatm@oree.ch> in [ruby-core:16627]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* thread.c (rb_gc_save_machine_context): call FLUSH_REGISTER_WINDOWSakr
to mark the register stack from GC on another thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07* thread.c (rb_thread_key_p): thread local storage stores ID.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07* thread.c (rb_thread_key_p): should always convert symbol to ID.matz
[ruby-dev:34588] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* io.c, signal.c, thread.c, thread_win32.c, include/ruby/intern.h:nobu
suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22* thread.c (rb_thread_stop_timer_thread): should clearmatz
timer_thread_id after stopping it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22* thread.c (thread_join): remove the current thread from the join listnobu
of the target thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13* thread_pthread.c (lock_func): should not check interrupts innobu
blocking region. [ruby-dev:34378] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09* thread.c (lock_func): optimized and checks for interrupt_flag.nobu
based on a patch from Sylvain Joyeux in [ruby-Patches-19361] and [ruby-Patches-19362]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08* thread.c (rb_mutex_sleep): ensures to re-acquire at waking up.nobu
[ruby-Patches-19361] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30* io.c: IO.copy_stream implemented. [ruby-dev:33843]akr
* thread.c (rb_fd_select): new function. * configure.in (sys/sendfile.h): check the header file. (sendfile): check the function. (pread): check the function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-01* eval_method.c (rb_get_method_body): ent->method may be freed bymatz
GC. [ruby-dev:31819] * thread.c (remove_event_hook): should not access freed memory. [ruby-dev:31820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28* eval.c (stack_check): made flag per threads.nobu
* thread.c (rb_thread_set_raised, rb_thread_reset_raised): prefixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-18* thread.c (thread_create_core): prohibit thread creation in thematz
frozen thread group. a patch in [ruby-dev:33176] from sheepman <sheepman AT sheepman.sakura.ne.jp>. * thread.c (thread_create_core): should inherit ThreadGroup from the current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-18* thread.c (thread_create_core): set thread group before creatingnobu
thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15115 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-14* thread.c: clear thread structure.ko1
(TODO: survey that child process should clear mutex or not). * bootstraptest/test_knownbug.rb, test_thread.rb: move a fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10* thread.c (rb_mutex_unlock): proper error message for unlockingmatz
mutex that is not locked. a patch from Yusuke ENDOH <mame at tsg.ne.jp> in [ruby-dev:33010]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14980 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
2007-12-25* thread.c: remove Thread.critical(=).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* include/ruby/ruby.h, thread.c: rename is_ruby_native_thread() toko1
ruby_native_thread_p(). * ext/tk/tcltklib.c: apply it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* thread.c (rb_thread_wait_fd_rw): should check EBADF on select().ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* README.EXT.ja, dir.c, eval.c, eval_intern.h, lex.c.src,matz
lex.c.blt, keywords, load.c, thread.c: more ANSI'ize. a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp> in [ruby-dev:32725] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14655 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-24* load.c (load_lock): reverted.nobu
* thread.c (rb_barrier_wait): check for recursive wait. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24enable several rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* thread.c (rb_thread_atfork): should not leave living_threadsnobu
referring freed table while allocating new table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* thread.c (rb_thread_atfork): fix to mark thread object.ko1
[ruby-dev:32404] * bootstraptest/test_knownbug.rb, test_fork.rb: move a fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14420 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
2007-12-20* insnhelper.ci, vm.c, vm_core.h: change interface ofko1
vm_invoke_block() to specify block ptr. [ruby-talk:266422] * cont.c, eval_jump.ci, insns.def, proc.c, signal.c, thread.c: apply above change. * bootstraptest/test_knownbug.rb: move fixed bug. * bootstraptest/test_block.rb: ditto. and add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-07* thread.c (recursive_pop): use object ID.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-07* thread.c (rb_exec_recursive): use Hash instead of Array fornobu
performance improvement. [ruby-core:13898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* thread.c (thread_initialize): fixed typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* proc.c (rb_proc_s_new): call initialize. [ruby-core:13824]nobu
* proc.c (rb_proc_location): return file name and line number where the proc is defined. * thread.c (thread_s_new): call initialize. [ruby-core:13835] * thread.c (thread_initialize): split initialize method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* parse.y (yycompile): get rid of tracing while parsing.nobu
[ruby-dev:31351] * thread.c (ruby_suppress_tracing): added a new parameter, which directs to call func always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e