Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
int type;
union {
int fd;
- union {
- void *ptr;
- uint64_t u64;
- } custom[BIO_POLL_DESCRIPTOR_NUM_CUSTOM];
+ void *custom;
} value;
} BIO_POLL_DESCRIPTOR;
Type values beginning with this value (inclusive) are reserved for application
allocation for custom poll descriptor types. The field I<value.custom> in the
-B<BIO_POLL_DESCRIPTOR> is an array of length B<BIO_POLL_DESCRIPTOR_NUM_CUSTOM>.
-Each entry in this array can store a void pointer or a B<uint64_t> and can be
-used by the application arbitrarily.
+B<BIO_POLL_DESCRIPTOR> is an opaque pointer which can be used by the application
+arbitrarily.
=back
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
-#define BIO_POLL_DESCRIPTOR_NUM_CUSTOM 4
typedef struct bio_poll_descriptor_st {
int type;
union {
int fd;
- union {
- void *ptr;
- uint64_t u64;
- } custom[BIO_POLL_DESCRIPTOR_NUM_CUSTOM];
+ void *custom;
} value;
} BIO_POLL_DESCRIPTOR;