diff options
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -179,7 +179,7 @@ fiber_context_create(ucontext_t *context, void (*func)(), void *arg, void *ptr, } #endif -#if FIBER_USE_NATIVE +#if FIBER_USE_NATIVE && !defined(_WIN32) #define MAX_MACHINE_STACK_CACHE 10 static int machine_stack_cache_index = 0; typedef struct machine_stack_cache_struct { @@ -1861,7 +1861,7 @@ rb_fiber_terminate(rb_fiber_t *fib, int need_interrupt) #elif !defined(_WIN32) fib->context.uc_stack.ss_sp = NULL; #endif -#endif + #ifdef MAX_MACHINE_STACK_CACHE /* Ruby must not switch to other thread until storing terminated_machine_stack */ terminated_machine_stack.ptr = fib->ss_sp; @@ -1870,6 +1870,7 @@ rb_fiber_terminate(rb_fiber_t *fib, int need_interrupt) fib->cont.machine.stack = NULL; fib->cont.machine.stack_size = 0; #endif +#endif ret_fib = return_fiber(); if (need_interrupt) RUBY_VM_SET_INTERRUPT(&ret_fib->cont.saved_ec); |