X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=include%2Fopenssl%2Fasync.h;h=910c144c6b8281790385a0b86c30230900bc1ae0;hb=7dd0f299387bac79c304dc7cb8056cd4684fb91f;hp=71aef3bf9889223ea416f9422633e76bdf46088f;hpb=48f4ad7718498577af52878b9e8b0924d8faf83f;p=openssl.git diff --git a/include/openssl/async.h b/include/openssl/async.h index 71aef3bf98..910c144c6b 100644 --- a/include/openssl/async.h +++ b/include/openssl/async.h @@ -31,12 +31,18 @@ extern "C" { typedef struct async_job_st ASYNC_JOB; typedef struct async_wait_ctx_st ASYNC_WAIT_CTX; +typedef int (*ASYNC_callback_fn)(void *arg); #define ASYNC_ERR 0 #define ASYNC_NO_JOBS 1 #define ASYNC_PAUSE 2 #define ASYNC_FINISH 3 +#define ASYNC_STATUS_UNSUPPORTED 0 +#define ASYNC_STATUS_ERR 1 +#define ASYNC_STATUS_OK 2 +#define ASYNC_STATUS_EAGAIN 3 + int ASYNC_init_thread(size_t max_size, size_t init_size); void ASYNC_cleanup_thread(void); @@ -52,6 +58,14 @@ int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key, OSSL_ASYNC_FD *fd, void **custom_data); int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, size_t *numfds); +int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx, + ASYNC_callback_fn *callback, + void **callback_arg); +int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx, + ASYNC_callback_fn callback, + void *callback_arg); +int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status); +int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx); int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd, size_t *numaddfds, OSSL_ASYNC_FD *delfd, size_t *numdelfds);