Loading crypto/async/arch/async_null.h +7 −8 Original line number Diff line number Diff line Loading @@ -63,15 +63,14 @@ typedef struct async_fibre_st { int dummy; } ASYNC_FIBRE; } async_fibre; # define ASYNC_set_ctx(nctx) 0 # define ASYNC_get_ctx() ((ASYNC_CTX *)NULL) # define ASYNC_FIBRE_swapcontext(o,n,r) 0 # define ASYNC_FIBRE_makecontext(c) # define ASYNC_FIBRE_free(f) # define ASYNC_FIBRE_init_dispatcher(f) # define async_set_ctx(nctx) 0 # define async_get_ctx() ((async_ctx *)NULL) # define async_fibre_swapcontext(o,n,r) 0 # define async_fibre_makecontext(c) # define async_fibre_free(f) # define async_fibre_init_dispatcher(f) #endif crypto/async/arch/async_posix.c +4 −4 Original line number Diff line number Diff line Loading @@ -54,14 +54,14 @@ #include "../async_locl.h" #include <openssl/async.h> #ifdef ASYNC_SYSV #ifdef ASYNC_POSIX # include <stddef.h> # include <ucontext.h> # include <unistd.h> # include <openssl/crypto.h> # include <openssl/async.h> __thread ASYNC_CTX *sysvctx; __thread async_ctx *sysvctx; #define STACKSIZE 32768 Loading @@ -69,7 +69,7 @@ __thread size_t pool_max_size = 0; __thread size_t pool_curr_size = 0; __thread STACK_OF(ASYNC_JOB) *pool = NULL; int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre) int async_fibre_init(async_fibre *fibre) { void *stack = NULL; Loading @@ -85,7 +85,7 @@ int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre) return 1; } void ASYNC_FIBRE_free(ASYNC_FIBRE *fibre) void async_fibre_free(async_fibre *fibre) { if (fibre->fibre.uc_stack.ss_sp) OPENSSL_free(fibre->fibre.uc_stack.ss_sp); Loading crypto/async/arch/async_posix.h +12 −12 Original line number Diff line number Diff line Loading @@ -58,25 +58,25 @@ # if _POSIX_VERSION >= 200112L # define ASYNC_SYSV # define ASYNC_POSIX # define ASYNC_ARCH # include <ucontext.h> # include <setjmp.h> # include "e_os.h" extern __thread ASYNC_CTX *sysvctx; extern __thread async_ctx *sysvctx; typedef struct async_fibre_st { ucontext_t fibre; jmp_buf env; int env_init; } ASYNC_FIBRE; } async_fibre; # define ASYNC_set_ctx(nctx) (sysvctx = (nctx)) # define ASYNC_get_ctx() (sysvctx) # define async_set_ctx(nctx) (sysvctx = (nctx)) # define async_get_ctx() (sysvctx) static inline int ASYNC_FIBRE_swapcontext(ASYNC_FIBRE *o, ASYNC_FIBRE *n, int r) static inline int async_fibre_swapcontext(async_fibre *o, async_fibre *n, int r) { o->env_init = 1; Loading @@ -90,14 +90,14 @@ static inline int ASYNC_FIBRE_swapcontext(ASYNC_FIBRE *o, ASYNC_FIBRE *n, int r) return 1; } # define ASYNC_FIBRE_makecontext(c) \ (ASYNC_FIBRE_init(c) \ # define async_fibre_makecontext(c) \ (async_fibre_init(c) \ && !getcontext(&(c)->fibre) \ && (makecontext(&(c)->fibre, ASYNC_start_func, 0), 1)) # define ASYNC_FIBRE_init_dispatcher(d) && (makecontext(&(c)->fibre, async_start_func, 0), 1)) # define async_fibre_init_dispatcher(d) int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre); void ASYNC_FIBRE_free(ASYNC_FIBRE *fibre); int async_fibre_init(async_fibre *fibre); void async_fibre_free(async_fibre *fibre); # endif #endif crypto/async/arch/async_win.c +4 −4 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ struct winpool { size_t max_size; }; void ASYNC_start_func(void); void async_start_func(void); int ASYNC_FIBRE_init_dispatcher(ASYNC_FIBRE *fibre) int async_fibre_init_dispatcher(async_fibre *fibre) { LPVOID dispatcher; Loading @@ -82,9 +82,9 @@ int ASYNC_FIBRE_init_dispatcher(ASYNC_FIBRE *fibre) return 1; } VOID CALLBACK ASYNC_start_func_win(PVOID unused) VOID CALLBACK async_start_func_win(PVOID unused) { ASYNC_start_func(); async_start_func(); } int async_pipe(int *pipefds) Loading crypto/async/arch/async_win.h +10 −10 Original line number Diff line number Diff line Loading @@ -66,19 +66,19 @@ typedef struct async_fibre_st { LPVOID fibre; } ASYNC_FIBRE; } async_fibre; # define ASYNC_set_ctx(nctx) \ # 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) \ # 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)) # define async_fibre_makecontext(c) \ ((c)->fibre = CreateFiber(0, async_start_func_win, 0)) # define async_fibre_free(f) (DeleteFiber((f)->fibre)) int ASYNC_FIBRE_init_dispatcher(ASYNC_FIBRE *fibre); VOID CALLBACK ASYNC_start_func_win(PVOID unused); int async_fibre_init_dispatcher(async_fibre *fibre); VOID CALLBACK async_start_func_win(PVOID unused); #endif Loading
crypto/async/arch/async_null.h +7 −8 Original line number Diff line number Diff line Loading @@ -63,15 +63,14 @@ typedef struct async_fibre_st { int dummy; } ASYNC_FIBRE; } async_fibre; # define ASYNC_set_ctx(nctx) 0 # define ASYNC_get_ctx() ((ASYNC_CTX *)NULL) # define ASYNC_FIBRE_swapcontext(o,n,r) 0 # define ASYNC_FIBRE_makecontext(c) # define ASYNC_FIBRE_free(f) # define ASYNC_FIBRE_init_dispatcher(f) # define async_set_ctx(nctx) 0 # define async_get_ctx() ((async_ctx *)NULL) # define async_fibre_swapcontext(o,n,r) 0 # define async_fibre_makecontext(c) # define async_fibre_free(f) # define async_fibre_init_dispatcher(f) #endif
crypto/async/arch/async_posix.c +4 −4 Original line number Diff line number Diff line Loading @@ -54,14 +54,14 @@ #include "../async_locl.h" #include <openssl/async.h> #ifdef ASYNC_SYSV #ifdef ASYNC_POSIX # include <stddef.h> # include <ucontext.h> # include <unistd.h> # include <openssl/crypto.h> # include <openssl/async.h> __thread ASYNC_CTX *sysvctx; __thread async_ctx *sysvctx; #define STACKSIZE 32768 Loading @@ -69,7 +69,7 @@ __thread size_t pool_max_size = 0; __thread size_t pool_curr_size = 0; __thread STACK_OF(ASYNC_JOB) *pool = NULL; int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre) int async_fibre_init(async_fibre *fibre) { void *stack = NULL; Loading @@ -85,7 +85,7 @@ int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre) return 1; } void ASYNC_FIBRE_free(ASYNC_FIBRE *fibre) void async_fibre_free(async_fibre *fibre) { if (fibre->fibre.uc_stack.ss_sp) OPENSSL_free(fibre->fibre.uc_stack.ss_sp); Loading
crypto/async/arch/async_posix.h +12 −12 Original line number Diff line number Diff line Loading @@ -58,25 +58,25 @@ # if _POSIX_VERSION >= 200112L # define ASYNC_SYSV # define ASYNC_POSIX # define ASYNC_ARCH # include <ucontext.h> # include <setjmp.h> # include "e_os.h" extern __thread ASYNC_CTX *sysvctx; extern __thread async_ctx *sysvctx; typedef struct async_fibre_st { ucontext_t fibre; jmp_buf env; int env_init; } ASYNC_FIBRE; } async_fibre; # define ASYNC_set_ctx(nctx) (sysvctx = (nctx)) # define ASYNC_get_ctx() (sysvctx) # define async_set_ctx(nctx) (sysvctx = (nctx)) # define async_get_ctx() (sysvctx) static inline int ASYNC_FIBRE_swapcontext(ASYNC_FIBRE *o, ASYNC_FIBRE *n, int r) static inline int async_fibre_swapcontext(async_fibre *o, async_fibre *n, int r) { o->env_init = 1; Loading @@ -90,14 +90,14 @@ static inline int ASYNC_FIBRE_swapcontext(ASYNC_FIBRE *o, ASYNC_FIBRE *n, int r) return 1; } # define ASYNC_FIBRE_makecontext(c) \ (ASYNC_FIBRE_init(c) \ # define async_fibre_makecontext(c) \ (async_fibre_init(c) \ && !getcontext(&(c)->fibre) \ && (makecontext(&(c)->fibre, ASYNC_start_func, 0), 1)) # define ASYNC_FIBRE_init_dispatcher(d) && (makecontext(&(c)->fibre, async_start_func, 0), 1)) # define async_fibre_init_dispatcher(d) int ASYNC_FIBRE_init(ASYNC_FIBRE *fibre); void ASYNC_FIBRE_free(ASYNC_FIBRE *fibre); int async_fibre_init(async_fibre *fibre); void async_fibre_free(async_fibre *fibre); # endif #endif
crypto/async/arch/async_win.c +4 −4 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ struct winpool { size_t max_size; }; void ASYNC_start_func(void); void async_start_func(void); int ASYNC_FIBRE_init_dispatcher(ASYNC_FIBRE *fibre) int async_fibre_init_dispatcher(async_fibre *fibre) { LPVOID dispatcher; Loading @@ -82,9 +82,9 @@ int ASYNC_FIBRE_init_dispatcher(ASYNC_FIBRE *fibre) return 1; } VOID CALLBACK ASYNC_start_func_win(PVOID unused) VOID CALLBACK async_start_func_win(PVOID unused) { ASYNC_start_func(); async_start_func(); } int async_pipe(int *pipefds) Loading
crypto/async/arch/async_win.h +10 −10 Original line number Diff line number Diff line Loading @@ -66,19 +66,19 @@ typedef struct async_fibre_st { LPVOID fibre; } ASYNC_FIBRE; } async_fibre; # define ASYNC_set_ctx(nctx) \ # 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) \ # 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)) # define async_fibre_makecontext(c) \ ((c)->fibre = CreateFiber(0, async_start_func_win, 0)) # define async_fibre_free(f) (DeleteFiber((f)->fibre)) int ASYNC_FIBRE_init_dispatcher(ASYNC_FIBRE *fibre); VOID CALLBACK ASYNC_start_func_win(PVOID unused); int async_fibre_init_dispatcher(async_fibre *fibre); VOID CALLBACK async_start_func_win(PVOID unused); #endif