|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Classes | |
| class | IpcClient |
| Abstract interface for IPC client. More... | |
| class | IpcServer |
| Abstract interface for IPC server. More... | |
| class | MpscConsumer |
| Multi-producer single-consumer - consumer side. More... | |
| struct | MpscDoorbell |
| Shared doorbell for waking consumer. More... | |
| class | MpscProducer |
| Multi-producer single-consumer - producer side. More... | |
| class | ShmClient |
| IPC client implementation using shared memory. More... | |
| class | ShmServer |
| IPC server implementation using shared memory. More... | |
| class | ShutdownRequested |
| Exception thrown by handler to signal graceful shutdown. More... | |
| class | SocketClient |
| IPC client implementation using Unix domain sockets. More... | |
| class | SocketServer |
| IPC server implementation using Unix domain sockets. More... | |
| struct | SpscCtrl |
| Control structure for SPSC ring buffer. More... | |
| class | SpscShm |
| Lock-free single-producer single-consumer shared memory ring buffer. More... | |
Functions | |
| int | futex_wait (volatile uint32_t *addr, uint32_t expect) |
| Atomic compare-and-wait operation. | |
| int | futex_wait_timeout (volatile uint32_t *addr, uint32_t expect, uint64_t timeout_ns) |
| Atomic compare-and-wait operation with timeout. | |
| int | futex_wake (volatile uint32_t *addr, int n) |
| Wake waiters blocked on an address. | |
| uint64_t | mono_ns_now () |
| Get current monotonic time in nanoseconds. | |
| bool | ring_send_msg (SpscShm &ring, const void *data, size_t len, uint64_t timeout_ns) |
| std::span< const uint8_t > | ring_receive_msg (SpscShm &ring, uint64_t timeout_ns) |
Variables | |
| constexpr size_t | SPSC_CACHELINE = 64 |
|
inline |
|
inline |
Atomic compare-and-wait operation with timeout.
Blocks if the value at addr equals expect, but only for up to timeout_ns nanoseconds. Works across process boundaries.
| addr | Pointer to 32-bit value to wait on |
| expect | Expected value - blocks if *addr == expect |
| timeout_ns | Maximum time to wait in nanoseconds (0 = return immediately if value matches) |
|
inline |
Wake waiters blocked on an address.
Wakes up to n waiters blocked on addr. Works across process boundaries.
| addr | Pointer to 32-bit value to wake on |
| n | Number of waiters to wake (1 for single, INT_MAX for all) |
|
inline |
Get current monotonic time in nanoseconds.
Uses CLOCK_MONOTONIC which is suitable for measuring elapsed time and not affected by system clock adjustments.
Definition at line 31 of file utilities.hpp.
|
inline |
Definition at line 39 of file shm_common.hpp.
|
inline |
Definition at line 12 of file shm_common.hpp.
|
constexpr |
Definition at line 21 of file spsc_shm.hpp.