Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::ipc::SpscCtrl Struct Reference

Control structure for SPSC ring buffer. More...

#include <spsc_shm.hpp>

Public Attributes

std::atomic< uint64_t > head
 
uint64_t wrap_head
 
std::atomic< bool > producer_blocked
 
std::array< char, SPSC_CACHELINE - sizeof(head) - sizeof(wrap_head) - sizeof(producer_blocked)> _pad0
 
std::atomic< uint64_t > tail
 
std::atomic< bool > consumer_blocked
 
std::array< char, SPSC_CACHELINE - sizeof(tail) - sizeof(consumer_blocked)> _pad1
 
uint64_t capacity
 
uint64_t mask
 

Detailed Description

Control structure for SPSC ring buffer.

Carefully aligned to avoid false sharing between producer and consumer.

Definition at line 28 of file spsc_shm.hpp.

Member Data Documentation

◆ _pad0

std::array<char, SPSC_CACHELINE - sizeof(head) - sizeof(wrap_head) - sizeof(producer_blocked)> bb::ipc::SpscCtrl::_pad0

Definition at line 33 of file spsc_shm.hpp.

◆ _pad1

std::array<char, SPSC_CACHELINE - sizeof(tail) - sizeof(consumer_blocked)> bb::ipc::SpscCtrl::_pad1

Definition at line 38 of file spsc_shm.hpp.

◆ capacity

uint64_t bb::ipc::SpscCtrl::capacity

Definition at line 41 of file spsc_shm.hpp.

◆ consumer_blocked

std::atomic<bool> bb::ipc::SpscCtrl::consumer_blocked

Definition at line 37 of file spsc_shm.hpp.

◆ head

std::atomic<uint64_t> bb::ipc::SpscCtrl::head

Definition at line 30 of file spsc_shm.hpp.

◆ mask

uint64_t bb::ipc::SpscCtrl::mask

Definition at line 42 of file spsc_shm.hpp.

◆ producer_blocked

std::atomic<bool> bb::ipc::SpscCtrl::producer_blocked

Definition at line 32 of file spsc_shm.hpp.

◆ tail

std::atomic<uint64_t> bb::ipc::SpscCtrl::tail

Definition at line 36 of file spsc_shm.hpp.

◆ wrap_head

uint64_t bb::ipc::SpscCtrl::wrap_head

Definition at line 31 of file spsc_shm.hpp.


The documentation for this struct was generated from the following file: