Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
spsc_shm.hpp File Reference

Single-producer/single-consumer shared-memory ring buffer (Linux, x86-64 optimized) More...

#include <array>
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <string>

Go to the source code of this file.

Classes

struct  bb::ipc::SpscCtrl
 Control structure for SPSC ring buffer. More...
 
class  bb::ipc::SpscShm
 Lock-free single-producer single-consumer shared memory ring buffer. More...
 

Namespaces

namespace  bb
 Entry point for Barretenberg command-line interface.
 
namespace  bb::ipc
 

Variables

constexpr size_t bb::ipc::SPSC_CACHELINE = 64
 

Detailed Description

Single-producer/single-consumer shared-memory ring buffer (Linux, x86-64 optimized)

  • Zero-copy between processes via MAP_SHARED
  • One producer, one consumer. No locks. Hot path has no syscalls
  • Adaptive spin, then futex sleep/wake on empty/full transitions
  • Variable-length message framing

Definition in file spsc_shm.hpp.