Skip to content

Commit

Permalink
cont.c: CreateFiberEx fallback
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Jul 21, 2015
1 parent 613d97c commit 2deaf03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cont.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 2deaf03

Please sign in to comment.