mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-09 22:49:43 +00:00
RB: use internal reclaim function
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
3b31023d84
commit
121abe3dbe
@ -111,6 +111,7 @@ do { \
|
||||
} while (0)
|
||||
|
||||
static void print_header(struct qb_ringbuffer_s * rb);
|
||||
static void _rb_chunk_reclaim(struct qb_ringbuffer_s * rb);
|
||||
|
||||
qb_ringbuffer_t *
|
||||
qb_rb_open(const char *name, size_t size, uint32_t flags,
|
||||
@ -404,7 +405,7 @@ qb_rb_chunk_alloc(struct qb_ringbuffer_s * rb, size_t len)
|
||||
*/
|
||||
if (rb->flags & QB_RB_FLAG_OVERWRITE) {
|
||||
while (qb_rb_space_free(rb) < (len + QB_RB_CHUNK_MARGIN)) {
|
||||
qb_rb_chunk_reclaim(rb);
|
||||
_rb_chunk_reclaim(rb);
|
||||
}
|
||||
} else {
|
||||
if (qb_rb_space_free(rb) < (len + QB_RB_CHUNK_MARGIN)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user