summaryrefslogtreecommitdiffstats
path: root/cont.c
Commit message (Collapse)AuthorAgeFilesLines
* * cont.c (rb_fiber_start): fixed unconditional test.nobu2009-11-031-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (fiber_free): don't free unallocated local_storage. see #1325.wanabe2009-11-021-2/+7
| | | | | | | | | | | | | * cont.c (cont_init): clear local_storage not to use current thread's. * cont.c (fiber_t_alloc, root_fiber_alloc): link itself always for a case that fiber_link_remove() is called before fiber_link_join(). * cont.c (fiber_init): clear cont->vm_stack and th->stack before root_fiber_alloc() in rb_fiber_current(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r25623wanabe2009-11-021-6/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (fiber_free): don't free unallocated local_storage. see #1325.wanabe2009-11-011-4/+6
| | | | | | | | | | | | * cont.c (cont_init): clear local_storage not to use current thread's. * cont.c (fiber_t_alloc, root_fiber_alloc): link itself always for a case that fiber_link_remove() is called before fiber_link_join(). * cont.c (fiber_init): don't join half-baked fiber. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,nobu2009-09-211-1/+1
| | | | | | | | | thread.c, vm.c, vm_core.h, vm_dump.c, vm_eval.c, vm_insnhelper.c, vm_method.c, template/insns_info.inc.tmpl, tool/instruction.rb: fixed types. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c, proc.c: added rdoc.nobu2009-09-211-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_new, cont_capture, fiber_t_alloc): needs alreadynobu2009-09-211-6/+13
| | | | | | | running thread. cf. [ruby-core:25681] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_memsize, fiber_memsize): constified.nobu2009-09-091-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_struct): constified dsize.nobu2009-09-091-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_memsize): fixed wrong expression on IA64.nobu2009-09-091-2/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_restore_1, rb_cont_call): should be Fiber.nobu2009-09-091-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_data_type, fiber_data_type): typed.nobu2009-09-081-5/+60
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_capture, fiber_store): reraise transferred error.nobu2009-06-011-2/+12
| | | | | | | | * cont.c (fiber_switch): transfers dead fiber error to the previouse or root fiber if the current fiber is dead. [ruby-core:23651] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fixed types.nobu2009-06-011-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-41/+41
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_alive_p): fix to return true instead of 1.ko12009-02-131-1/+1
| | | | | | | | | [ruby-dev:37991] * test/ruby/test_fiber.rb: add a test for Fiber#alive? git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_mark, cont_capture, cont_restore_1): use #else insteadmame2009-02-051-3/+3
| | | | | | | | of #elif. a patch from NISHIMATSU Takeshi <t_nissie at yahoo.co.jp> in [ruby-list:45856]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_current), dln.c (dln_print_undef, dln_undefined),nobu2009-02-011-1/+1
| | | | | | | | | | | eval.c (rb_iterator_p, rb_need_block), load.c: (Init_load), ruby.c (uscore_get, rb_f_chop), st.c (stat_col), signal.c (rb_signal_buff_size, ruby_sig_finalize), thread.c (rb_thread_sleep_forever, rb_thread_sleep_deadly, rb_thread_alone): protoized. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (ruby_Init_{Continuation_body,Fiber_as_Coroutine}): prefixednobu2009-01-201-2/+2
| | | | | | | | | with ruby_ to export. * ext/continuation/continuation.c, ext/fiber/fiber.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c: add a prefix "rb_" to exposed functionsko12009-01-191-4/+4
| | | | | | | | | | | | | | | | | vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(), vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(), vm_get_sourceline(), vm_cref(), vm_localjump_error(), vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump(). This changes may affect only core because most of renamed functions require a pointer of not-exposed struct such as rb_thread_t or NODE. In short, they are core functions. * cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c, vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_restore_0): padding size doesn't need to be largenobu2009-01-171-4/+12
| | | | | | | if alloca is used. suppress warnings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix prototype declare of register_stack_extendtakano322009-01-141-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_restore_1): should not be inlined.ko12009-01-101-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_restore_0): streamlined to ensure O(1) time. based onnobu2009-01-061-18/+28
| | | | | | | a patch by Brent Roman <brent AT mbari.org>. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: small RDoc fix mentioned from <radek.bulat at gmail.com>matz2008-12-281-1/+1
| | | | | | in [ruby-core:20921]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: rdoc for Fiber. patch by Muhammad Ali.yugui2008-12-271-0/+119
| | | | | | | [ruby-core:20894] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (fiber_status), template/insns.inc.tmpl (ruby_vminsn_type),nobu2008-12-091-1/+1
| | | | | | | | vm_insnhelper.h (BOP): ISO C forbids comma at end of enumerator list. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_start): calls with exact argument number.nobu2008-12-011-2/+7
| | | | | | | [ruby-core:20088] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (fiber_alloc): separate allocation and initialization.matz2008-11-281-17/+26
| | | | | | allow subclass to override #initialize. [ruby-core:20086] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_mark, cont_capture, cont_restore_1): speed upmame2008-11-181-1/+26
| | | | | | | continuation by copying only valid YARV stack. [ruby-dev:37106] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: separate data structure between rb_fiber_t andko12008-10-221-68/+152
| | | | | | | | | rb_context_t (rb_fiber_t includes rb_context_t). rb_fiber_t has double linked list of fibers in same threads. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbidsshyouhei2008-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | comma at end of enumerator list * include/ruby/ruby.h (enum ruby_value_type): ditto. * eval_intern.h (enum): ditto. * vm_core.h (enum rb_thread_status): ditto. * parse.y (enum lex_state_e): ditto. * parse.y (enum string_type): ditto. * process.c (enum): ditto. * ruby.c (enum dump_flag_bits): ditto. * ruby.c (enum disable_flag_bits): ditto. * compile.c (iseq_link_element): ditto * debug.c (union): ditto. * cont.c (enum context_type): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko12008-06-081-2/+1
| | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_restore_0): dynamic stack direction code should bematz2008-05-081-1/+1
| | | | | | consistent with static one. [ruby-talk:301152] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_restore_0): fixed typo. [ruby-core:15821]nobu2008-03-071-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, thread.c, cont.c: add RUBY_VM_SET_INTERRUPT(),ko12007-12-251-1/+1
| | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@14654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c, vm.h: fix to support sparc machine.ko12007-12-231-0/+2
| | | | | | | | a patch from Yusuke ENDOH <mame AT tsg.ne.jp> git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci, vm.c, vm_core.h: change interface ofko12007-12-201-1/+1
| | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@14356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: add rb_context_t#type.ko12007-11-091-22/+39
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_free): check Fiber or Continuation.ko12007-10-061-1/+2
| | | | | | | | * bootstraptest/test_knownbug.rb: remove a fixed test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: Thread local storage should be fiber local.ko12007-09-281-0/+5
| | | | | | | | | * bootstraptest/test_knownbug.rb, test/ruby/test_fiber.rb: move a fixed test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: Fiber as SemiCoroutine on default. [ruby-core:12146]ko12007-09-261-4/+4
| | | | | | | | * ext/fiber/fiber.c: enable Fiber#transfer. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix to remove Fiber.new until fiber.so is not loaded.ko12007-08-261-10/+16
| | | | | | | | * test/ruby/test_continuation.rb: fix to use resume. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: rename FIBER_STACK_SIZE to FIBER_VM_STACK_SIZE.ko12007-08-251-2/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: separate Continuation and Fiber from core.ko12007-08-251-30/+31
| | | | | | | | | | | | | | * ext/continuation/*, ext/fiber/*: ditto. * include/ruby/ruby.h: remove rb_cFiber. * include/ruby/intern.h: add the rb_fiber_new() declaration. * enumerator.c (next_init): fix to use rb_fiber_new(). * test/ruby/test_enumerator.rb: remove next? tests. * test/ruby/test_continuation.rb: add a require 'continuation'. * test/ruby/test_fiber.rb: add a require 'fiber'. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield):nobu2007-08-231-6/+4
| | | | | | | | | | suppress warnings. * cont.c (rb_fiber_start): change on non-volatile variable between setjmp and longjmp may not has an effect. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: add Fiber#resume and Fiber.yield.ko12007-08-211-37/+92
| | | | | | | | | | | and Fiber::Core class to realize Coroutine. * include/ruby/intern.h: declare rb_fiber_yield(), rb_fiber_resume(), * enumerator.c: use above api. * test/ruby/test_fiber.rb: fix and add tests for above changes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_m_yield): added. use this functionko12007-08-151-1/+7
| | | | | | | | for Fiber#yield instead of rb_fiber_yield. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e