24 RCSIDH(fring_h,
"$Id: b4e45fe98c43e74a2d38c519242adbcedf4197ed $")
30 #include <freeradius-devel/build.h>
31 #include <freeradius-devel/missing.h>
32 #include <freeradius-devel/util/talloc.h>
bool lock
Perform thread synchronisation.
Standard thread safe circular buffer.
void * fr_fring_next(fr_fring_t *fring)
Remove an item from the buffer.
int fr_fring_insert(fr_fring_t *fring, void *obj)
Insert a new item into the circular buffer if the buffer is not full.
fr_fring_t * fr_fring_alloc(TALLOC_CTX *ctx, uint32_t size, bool lock)
Initialise a ring buffer with fixed element size.
int fr_fring_overwrite(fr_fring_t *fring, void *obj)
Insert a new item into the circular buffer, freeing the tail if we hit it.