ring_buf
Loading...
Searching...
No Matches
ring_buf_yield.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: MIT
3 * SPDX-FileCopyrightText: 2024, Roy Ratcliffe, Northumberland, United Kingdom
4 */
32#ifndef __RING_BUF_YIELD_H__
33#define __RING_BUF_YIELD_H__
34
35#include "ring_buf.h"
36
62 int yield(void *space, int index, void *extra),
63 void *extra);
64
82int ring_buf_get_yield(struct ring_buf *buf, void *data, ring_buf_size_t size,
83 int yield(void *data, int index, void *extra),
84 void *extra);
85
86#endif /* __RING_BUF_YIELD_H__ */
Ring buffer function prototypes.
size_t ring_buf_size_t
Ring buffer size type.
Definition ring_buf.h:64
int ring_buf_get_yield(struct ring_buf *buf, void *data, ring_buf_size_t size, int yield(void *data, int index, void *extra), void *extra)
Copies buffer space and yields it to a callback function.
int ring_buf_get_claim_yield(struct ring_buf *buf, ring_buf_size_t size, int yield(void *space, int index, void *extra), void *extra)
Claims ring buffer space and yields it to a callback function.
Ring buffer instance.
Definition ring_buf.h:128