Skip to content

Commit

Permalink
QUIC REACTOR: Add utility function for merging tick results
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #22674)
  • Loading branch information
hlandau committed Dec 21, 2023
1 parent 70a7e54 commit 26624ca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/internal/quic_reactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26624ca

Please sign in to comment.