Simplify async pool handling
A lot of the pool handling code was in the arch specific files, but was actually boiler plate and the same across the implementations. This commit moves as much code as possible out of the arch specific files. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
@@ -73,7 +73,8 @@
|
||||
# include <setjmp.h>
|
||||
# include "e_os.h"
|
||||
|
||||
extern __thread async_ctx *sysvctx;
|
||||
extern __thread async_ctx *posixctx;
|
||||
extern __thread async_pool *posixpool;
|
||||
|
||||
typedef struct async_fibre_st {
|
||||
ucontext_t fibre;
|
||||
@@ -81,8 +82,10 @@ typedef struct async_fibre_st {
|
||||
int env_init;
|
||||
} async_fibre;
|
||||
|
||||
# define async_set_ctx(nctx) (sysvctx = (nctx))
|
||||
# define async_get_ctx() (sysvctx)
|
||||
# define async_set_ctx(nctx) (posixctx = (nctx))
|
||||
# define async_get_ctx() (posixctx)
|
||||
# define async_set_pool(p) (posixpool = (p))
|
||||
# define async_get_pool() (posixpool)
|
||||
|
||||
static inline int async_fibre_swapcontext(async_fibre *o, async_fibre *n, int r)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user