Skip to main content

Module ring

Module ring 

Source
Expand description

Each buffered channel’s ring (rings), sized as filib lays it out: HEADER, then as many payload-sized slots as fit. A lowering, not a type, so it is sized here; a region with no slot is an error.

Structs§

Ring
capacity slots of slot_size bytes after the header.

Constants§

HEADER
filib’s ring::HEADER.
MAX_CAPACITY
filib’s ring::MAX_CAPACITY, the same for every ring: the indices are u32 and run mod 2N, so 2N fits a u32. A ring holds at most what fits in its region, ⌊(size − HEADER) / sizeof(T)⌋, capped at this.

Functions§

bytes
A value’s bytes, as the C backend lays it out.
rings
Every channel’s ring, None if unbuffered, and a warning for each ring that leaves part of its region unused because what fits is more than MAX_CAPACITY.