[ruby-cvs:66652] ko1:r59474 (trunk): fix stack storing for root fibers.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Aug 3 06:48:51 JST 2017


ko1	2017-08-03 06:48:51 +0900 (Thu, 03 Aug 2017)

  New Revision: 59474

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59474

  Log:
    fix stack storing for root fibers.
    
    * cont.c (root_fiber_alloc): this function is called by fiber_current()
      and fiber_store(). fiber_current() should clear VM stack information
      in a fiber data because runnning thread knows stack information and has
      responsibility to manage it. However fiber_store() requires to remain
      VM stack information in a fiber data because the responsibility to manage
      VM stack is moved to the Fiber from the Thread (and switch to another
      fiber).
    
    * cont.c (root_fiber_alloc): save thread's fiber and root_fiber information.

  Modified files:
    trunk/cont.c
    trunk/vm.c


More information about the ruby-cvs mailing list