ko1 db3cc675f3 Fix Fiber with Thread issue on Windows [Bug #14642]
* cont.c (rb_threadptr_root_fiber_setup): divide into two functions:
  * rb_threadptr_root_fiber_setup_by_parent(): called by the parent thread.
  * rb_threadptr_root_fiber_setup_by_child(): called by the created thread.

  `rb_threadptr_root_fiber_setup()` is called by the parent thread and
  set fib->fib_handle by ConvertThreadToFiber() on the parent thread on
  Windows enveironment.
  This means that root_fib->fib_handle of child thread is initialized
  with parent thread's Fiber handle. Furthermore, second call of
  `ConvertThreadToFiber()` for the same thread fails.

  This patch solves this weird situateion. However, maybe we can make more
  clean code.

* thread.c (thread_start_func_2): call
  `rb_threadptr_root_fiber_setup_by_child()` at thread initialize routine.

* vm.c (th_init): call `rb_threadptr_root_fiber_setup_by_parent()`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-03 10:21:47 +00:00
..
2017-12-23 00:30:33 +00:00
2017-10-08 07:00:01 +00:00
2018-03-28 09:58:52 +00:00
2017-12-26 10:10:41 +00:00
2018-01-31 04:02:17 +00:00
2018-03-25 14:06:06 +00:00
2018-03-28 10:12:17 +00:00
2018-02-01 02:56:28 +00:00
2018-01-18 03:53:46 +00:00
2018-02-20 09:26:38 +00:00
2018-03-10 11:26:54 +00:00
2017-12-16 00:36:31 +00:00