VirtualBox

source: vbox/trunk/src/libs/openssl-3.3.2/crypto/async/async_local.h@ 109193

Last change on this file since 109193 was 108206, checked in by vboxsync, 3 months ago

openssl-3.3.2: Exported all files to OSE and removed .scm-settings ​bugref:10757

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/*
2 * Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10/*
11 * Must do this before including any header files, because on MacOS/X <stlib.h>
12 * includes <signal.h> which includes <ucontext.h>
13 */
14#if defined(__APPLE__) && defined(__MACH__) && !defined(_XOPEN_SOURCE)
15# define _XOPEN_SOURCE /* Otherwise incomplete ucontext_t structure */
16# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
17#endif
18
19#if defined(_WIN32)
20# ifdef VBOX
21# include <iprt/win/winsock2.h>
22# include <iprt/win/ws2tcpip.h>
23# include <iprt/win/windows.h>
24# else
25# include <windows.h>
26# endif
27#endif
28
29#include "crypto/async.h"
30#include <openssl/crypto.h>
31
32typedef struct async_ctx_st async_ctx;
33typedef struct async_pool_st async_pool;
34
35#include "arch/async_win.h"
36#include "arch/async_posix.h"
37#include "arch/async_null.h"
38
39struct async_ctx_st {
40 async_fibre dispatcher;
41 ASYNC_JOB *currjob;
42 unsigned int blocked;
43};
44
45struct async_job_st {
46 async_fibre fibrectx;
47 int (*func) (void *);
48 void *funcargs;
49 int ret;
50 int status;
51 ASYNC_WAIT_CTX *waitctx;
52 OSSL_LIB_CTX *libctx;
53};
54
55struct fd_lookup_st {
56 const void *key;
57 OSSL_ASYNC_FD fd;
58 void *custom_data;
59 void (*cleanup)(ASYNC_WAIT_CTX *, const void *, OSSL_ASYNC_FD, void *);
60 int add;
61 int del;
62 struct fd_lookup_st *next;
63};
64
65struct async_wait_ctx_st {
66 struct fd_lookup_st *fds;
67 size_t numadd;
68 size_t numdel;
69 ASYNC_callback_fn callback;
70 void *callback_arg;
71 int status;
72};
73
74DEFINE_STACK_OF(ASYNC_JOB)
75
76struct async_pool_st {
77 STACK_OF(ASYNC_JOB) *jobs;
78 size_t curr_size;
79 size_t max_size;
80};
81
82void async_local_cleanup(void);
83void async_start_func(void);
84async_ctx *async_get_ctx(void);
85
86void async_wait_ctx_reset_counts(ASYNC_WAIT_CTX *ctx);
87
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette