Skip to content

Commit

Permalink
Add locking to QUIC front-end
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 #20348)
  • Loading branch information
hlandau committed Mar 30, 2023
1 parent 4847599 commit a848925
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 62 deletions.
21 changes: 21 additions & 0 deletions include/internal/quic_channel.h
Expand Up @@ -61,8 +61,29 @@
* mutex which then serves as the channel mutex; see QUIC_CHANNEL_ARGS.
*/

/*
* The function does not acquire the channel mutex and assumes it is already
* held by the calling thread.
*
* Any function tagged with this has the following precondition:
*
* Precondition: must hold channel mutex (unchecked)
*/
# define QUIC_NEEDS_LOCK

/*
* The function acquires the channel mutex and releases it before returning in
* all circumstances.
*
* Any function tagged with this has the following precondition and
* postcondition:
*
* Precondition: must not hold channel mutex (unchecked)
* Postcondition: channel mutex is not held (by calling thread)
*
*/
# define QUIC_TAKES_LOCK

# define QUIC_TODO_LOCK

# define QUIC_CHANNEL_STATE_IDLE 0
Expand Down

0 comments on commit a848925

Please sign in to comment.