Implement windows async thread local variable support
[openssl.git] / crypto / async / arch / async_win.h
index 42574a77bbc01f3306414c8a0480780e971064dc..77e41e405b9e8486465ae845030ea8b2b9f0b085 100644 (file)
 
 typedef struct async_fibre_st {
     LPVOID fibre;
+    int converted;
 } async_fibre;
 
-# define async_set_ctx(nctx) \
-        (CRYPTO_set_thread_local(CRYPTO_THREAD_LOCAL_ASYNC_CTX, (void *)(nctx)))
-# define async_get_ctx() \
-        ((async_ctx *)CRYPTO_get_thread_local(CRYPTO_THREAD_LOCAL_ASYNC_CTX))
 # define async_fibre_swapcontext(o,n,r) \
         (SwitchToFiber((n)->fibre), 1)
 # define async_fibre_makecontext(c) \
         ((c)->fibre = CreateFiber(0, async_start_func_win, 0))
 # define async_fibre_free(f)             (DeleteFiber((f)->fibre))
 
+async_ctx *async_get_ctx(void);
+int async_set_ctx(async_ctx *ctx);
+
 int async_fibre_init_dispatcher(async_fibre *fibre);
 VOID CALLBACK async_start_func_win(PVOID unused);
 
+async_pool *async_get_pool(void);
+int async_set_pool(async_pool *pool);
+
 #endif