QUIC REACTOR: Add utility function for merging tick results

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)
This commit is contained in:
Hugo Landau 2023-11-09 10:27:13 +00:00
parent 70a7e543a1
commit 26624caf17
1 changed files with 9 additions and 0 deletions

View File

@ -73,6 +73,15 @@ typedef struct quic_tick_result_st {
OSSL_TIME tick_deadline;
} QUIC_TICK_RESULT;
static ossl_inline ossl_unused void
ossl_quic_tick_result_merge_into(QUIC_TICK_RESULT *r,
const QUIC_TICK_RESULT *src)
{
r->net_read_desired = r->net_read_desired || src->net_read_desired;
r->net_write_desired = r->net_write_desired || src->net_write_desired;
r->tick_deadline = ossl_time_min(r->tick_deadline, src->tick_deadline);
}
typedef struct quic_reactor_st {
/*
* BIO poll descriptors which can be polled. poll_r is a poll descriptor