Skip to content

Commit

Permalink
ringbuf: Less noise on ring overflow
Browse files Browse the repository at this point in the history
- Hint that a ring has overflown only once, and only in verbose mode
  • Loading branch information
LekKit authored Mar 6, 2024
1 parent fb51843 commit 8edc33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ringbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool ringbuf_put(ringbuf_t* rb, const void* data, size_t len)
ringbuf_write(rb, data, len);
return true;
}
rvvm_warn("Overflow in ring %p! (size: %u, consumed: %u, len: %u)",
(void*)rb, (uint32_t)rb->size, (uint32_t)rb->consumed, (uint32_t)len);
DO_ONCE(rvvm_info("Overflow in ring %p! (size: %u, consumed: %u, len: %u)",
(void*)rb, (uint32_t)rb->size, (uint32_t)rb->consumed, (uint32_t)len));
return false;
}

0 comments on commit 8edc33a

Please sign in to comment.