2.4.3.2 Reading¶
Functions that may only be called by the read thread.
-
uint32_t zix_ring_peek(ZixRing *ring, void *dst, uint32_t size)¶
Read from the ring without advancing the read head.
- Parameters:
ring – The ring to read data from.
dst – The buffer to write data to.
size – The number of bytes to read from
ring
and write todst
.
- Returns:
The number of bytes read, which is either
size
on success, or zero on failure.
-
uint32_t zix_ring_read(ZixRing *ring, void *dst, uint32_t size)¶
Read from the ring and advance the read head.
- Parameters:
ring – The ring to read data from.
dst – The buffer to write data to.
size – The number of bytes to read from
ring
and write todst
.
- Returns:
The number of bytes read, which is either
size
on success, or zero on failure.