mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
cont.c: CreateFiberEx fallback
* cont.c (fiber_initialize_machine_stack_context): fallback definition of CreateFiberEx for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
613d97c525
commit
2deaf03401
1 changed files with 4 additions and 0 deletions
4
cont.c
4
cont.c
|
@ -659,6 +659,10 @@ fiber_initialize_machine_stack_context(rb_fiber_t *fib, size_t size)
|
|||
rb_thread_t *sth = &fib->cont.saved_thread;
|
||||
|
||||
#ifdef _WIN32
|
||||
# if defined(_MSC_VER) && _MSC_VER <= 0x1200
|
||||
# define CreateFiberEx(cs, stacksize, flags, entry, param) \
|
||||
CreateFiber((stacksize), (entry), (param))
|
||||
# endif
|
||||
fib->fib_handle = CreateFiberEx(size - 1, size, 0, fiber_entry, NULL);
|
||||
if (!fib->fib_handle) {
|
||||
/* try to release unnecessary fibers & retry to create */
|
||||
|
|
Loading…
Reference in a new issue