summaryrefslogtreecommitdiffstats
path: root/crypto/async/arch/async_win.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/async/arch/async_win.h')
-rw-r--r--crypto/async/arch/async_win.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/async/arch/async_win.h b/crypto/async/arch/async_win.h
index 87e661d766..eb61b032e0 100644
--- a/crypto/async/arch/async_win.h
+++ b/crypto/async/arch/async_win.h
@@ -26,8 +26,16 @@ typedef struct async_fibre_st {
# define async_fibre_swapcontext(o,n,r) \
(SwitchToFiber((n)->fibre), 1)
-# define async_fibre_makecontext(c) \
+
+# if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
+# define async_fibre_makecontext(c) \
+ ((c)->fibre = CreateFiberEx(0, 0, FIBER_FLAG_FLOAT_SWITCH, \
+ async_start_func_win, 0))
+# else
+# define async_fibre_makecontext(c) \
((c)->fibre = CreateFiber(0, async_start_func_win, 0))
+# endif
+
# define async_fibre_free(f) (DeleteFiber((f)->fibre))
int async_fibre_init_dispatcher(async_fibre *fibre);