summaryrefslogtreecommitdiff
path: root/thread.c
AgeCommit message (Collapse)Author
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
2007-11-22* insnhelper.ci (vm_search_normal_superclass): rename function.matz
* insnhelper.ci (vm_search_superclass): ditto. * proc.c (struct METHOD): rename rklass -> rclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21* vm.c: fix to recycle thread data (VM stack).ko1
* thread.c: ditto. * benchmark/bm_vm3_thread_create_join.rb: add loop count. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* gc.h, vm_core.h: decl of rb_gc_save_machine_context()ko1
should be at vm_core.h. * include/ruby/ruby.h, intern.h: remove type rb_thread_t. * include/ruby/intern.h: change rb_unblock_function_t, rb_unblock_function_t. * file.c, process.c: apply above changes. * thread.c, thread_pthread.ci, thread_win32.ci: ditto. * io.c: support blocking open (2). [ruby-core:13614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13* blockinlining.c, compile.c, compile.h, debug.c, debug.h,ko1
id.c, insnhelper.h, insns.def, thread.c, thread_pthread.ci, thread_pthread.h, thread_win32.ci, thread_win32.h, vm.h, vm_dump.c, vm_evalbody.ci, vm_opts.h: fix comments and copyright year. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-12 * thread.c (call_trace_proc): should return value.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-11* insnhelper.ci (vm_call_method): pass mn->nd_clss toshugo
vm_call_cfunc() instead of klass. * vm.c (rb_thread_method_id_and_klass): traverse parent_iseq. * thread.c (call_trace_proc): use rb_thread_method_id_and_klass(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-10* thread.c (call_trace_proc): don't call ID2SYM() for ID_ALLOCATORshugo
to avoid SEGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-06* eval_load.c (rb_feature_p): check if the feature is loading withnobu
load path. [ruby-dev:31932] * eval_load.c (load_lock): check the result of barrier waiting. * thread.c (rb_barrier_wait): check if owned by the current thread. * thread.c (rb_barrier_release): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28* vm_core.h (rb_vm_struct): fix typo: bufferd -> buffered.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27* thread.c: fix Mutex to be interruptable lock.ko1
* thread_win32.ci, thread_win32.h, thread_pthread.ci, thread_pthread.h: prepare native_cond_*() which are based on pthread_cond_*() spec. * prelude.rb: fix Mutex#synchronize method. * vm_core.h, include/ruby/intern.h: change unblock function interface (to pass some user data). * file.c, process.c: ditto. * benchmark/bm_vm2_mutex.rb: add a benchmark for mutex. * benchmark/bm_vm3_thread_mutex.rb: add a benchmark for mutex with contension. * benchmark/run.rb: fix to remove ENV['RUBYLIB'] for matzruby. * test/ruby/test_thread.rb: add a test. * common.mk: fix benchmark options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* prelude.rb: added. run this script on startup.ko1
* tool/compile_prelude.rb: compile prelude.rb to C string. (prelude.rb -> prelude.c) * common.mk: fix to build with prelude.c. * inits.c (rb_call_inits): ditto. * thread.c (Init_Thread): move definition of Mutex#synchronize to prelude.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* vm_core.h (struct rb_thread_struct): removed first_func_arg andnobu
reuse first_args instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* thread.c (is_ruby_native_thread): check properly. [ruby-dev:31166]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-17* thread.c (rb_thread_terminate_all): fix to ignoreko1
exceptions. * thread.c (thread_start_func_2): fix abort_on_exception process. [ruby-dev:31394] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-12* thread.c (rb_thread_raise): check if target thread isko1
thrown by another thread or not. [ruby-dev:31371] * bootstraptest/test_thread.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-10* thread.c (thread_start_func_2): not re-raise to main thread if it isnobu
joining the current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-10* thread.c (thread_create_core): inherit the priority of creatingnobu
thread. submitted at [ruby-core:11873] by David Flanagan <david AT davidflanagan.com>. [ruby-core:11876] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-09* thread.c (thread_start_func_2): let abort_on_exception work.nobu
[ruby-core:11873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22* thread.c (is_ruby_native_thread): made an int function asnobu
well as version 1.8. * include/ruby/ruby.h (is_ruby_native_thread): moved prototype from intern.h as well as version 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-20* compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not tonobu
initialize aggregations with dynamic values. [ruby-talk:259306] * eval.c (rb_protect): not to initialize aggregations with dynamic values. [ruby-talk:259306] * gc.c (mark_current_machine_context): ditto. * thread.c (thgroup_list, call_trace_func): ditto. * vm.c (vm_init_redefined_flag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14* configure.in: add --enable-valgrind.akr
* gc.h (SET_MACHINE_STACK_END): new macro to replace rb_gc_set_stack_end. it find out accurate stack boundary by asm using gcc on x86. * thread.c (rb_gc_set_stack_end): don't define if asm-version SET_MACHINE_STACK_END is available. * gc.c (mark_current_thread): extracted from garbage_collect. it use SET_MACHINE_STACK_END to not scan out of stack area. it notify conservative GC information to valgrind if --enable-valgrind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* blockinlining.c: remove "yarv" prefix.ko1
* array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* thread.c (thread_join): pthread_t may not be pointer.nobu
* thread_pthread.ci (ubf_select_each): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* thread_pthread.ci (thread_start_func_2): not use a directive insidenobu
a macro argument. [ruby-talk:258763] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26* thread.c (rb_thread_wait_fd_rw): terminate fdset.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* call_cfunc.ci: removed.ko1
* insnhelper.ci: added. this function includes all functions that vm insns need. * common.mk: ditto. * insnhelper.h, vm.h, vm.c: move some declaration. * gc.h: remove GC_CHECK() macro because GC.stress is more useful. * compile.c, iseq.c, vm_dump: ditto. * gc.h, thread.c: move a prototype decalaration. * debug.c, debug.h: rename some functions. * compile.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* vm.c: some refactoring.ko1
* rename th_* to vm_*. * remove unused variables functions. * add prototypes. * blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h, eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y, proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-18* parse.y (yycompile): disable trace while creating ruby_debug_lines.nobu
[ruby-talk:253586] * thread.c (ruby_suppress_tracing): new function to call a function with suppressing trace. * lib/debug.rb, lib/tracer.rb: for YARV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e