|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
A single-producer/single-consumer ring of depth WIRED_SRVINBOX_DEPTH. More...
#include <srvinbox.h>
Data Fields | |
| wired_srvinbox_slot | slots [WIRED_SRVINBOX_DEPTH] |
| ring storage | |
| u32 | prod |
| free-running publish counter, producer-owned | |
| u32 | cons |
| free-running release counter, consumer-owned | |
A single-producer/single-consumer ring of depth WIRED_SRVINBOX_DEPTH.
prod is written only by the producer (RELEASE on publish), read by the consumer (ACQUIRE) to decide whether a pop has a message to read. cons is written only by the consumer (RELEASE on release), read by the producer (ACQUIRE) to decide whether a push has room – the SPSC contract is structural: exactly one thread may ever call push, exactly one (a different one) may ever call pop.