diff options
author | Arran Cudbard-Bell <a.cudbardb@freeradius.org> | 2022-02-24 13:13:25 -0500 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2022-03-10 13:54:07 +0000 |
commit | f6f56f4776727e18d4dd5490e3b507bae068013a (patch) | |
tree | cf3781579d62905f2e4198f2595204ba4b22892c /include | |
parent | 83c48d96ff24728d94e0890f320b0d1220d9cba3 (diff) |
async_posix: Allow custom stack allocation functions to be specified for POSIX contexts
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17762)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/async.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/openssl/async.h b/include/openssl/async.h index bc27d5db06..94429a0009 100644 --- a/include/openssl/async.h +++ b/include/openssl/async.h @@ -80,6 +80,14 @@ int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key); int ASYNC_is_capable(void); +typedef void *(*ASYNC_stack_alloc_fn)(size_t *num); +typedef void (*ASYNC_stack_free_fn)(void *addr); + +int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn, + ASYNC_stack_free_fn free_fn); +void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn, + ASYNC_stack_free_fn *free_fn); + int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret, int (*func)(void *), void *args, size_t size); int ASYNC_pause_job(void); |