libmizu 0.2.0
Lock-free shared-memory IPC at thread speed in C11
Loading...
Searching...
No Matches
mizu_channel_opts_s Struct Reference

size-stamped options; mizu_channel_opts_init zeroes + stamps, and create refuses a struct whose stamp is not this header's sizeof (the stamp is what lets a later release accept an older, shorter struct). More...

#include <mizu.h>

Data Fields

uint32_t size
uint32_t capacity
 ring slots, power of two, 2..2^24
uint32_t slot_size
 bytes per slot, power of two, 64..2^20
uint64_t arena_size
 bytes per direction; 0 disables
uint32_t flags
 MIZU_FLAG_SPIN; other bits rejected.
const uint8_t * drop
 peer bootstrap bytes (may be NULL)
uint64_t drop_size
 their byte count, at most MIZU_DROP_MAX

Detailed Description

size-stamped options; mizu_channel_opts_init zeroes + stamps, and create refuses a struct whose stamp is not this header's sizeof (the stamp is what lets a later release accept an older, shorter struct).

drop is the peer bootstrap payload, copied into the region at create (opaque bytes; its first byte is a MIZU_DROP_* tag by binding convention; the peer's binding reads them after attach). create validates every field and returns MIZU_ERR on a value out of range, an unknown flag bit, or a drop past MIZU_DROP_MAX.


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