mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-09 22:49:43 +00:00
rb: add a get name function
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
2787bea55c
commit
e7975a77e3
@ -125,6 +125,13 @@ qb_ringbuffer_t *qb_rb_open(const char *name, size_t size, uint32_t flags);
|
||||
*/
|
||||
void qb_rb_close(qb_ringbuffer_t * rb);
|
||||
|
||||
/**
|
||||
* Get the name of the ringbuffer.
|
||||
* @param rb ringbuffer instance
|
||||
* @return name.
|
||||
*/
|
||||
char* qb_rb_name_get(qb_ringbuffer_t * rb);
|
||||
|
||||
/**
|
||||
* Write a chunk to the ring buffer.
|
||||
*
|
||||
|
||||
@ -226,6 +226,11 @@ void qb_rb_close(qb_ringbuffer_t * rb)
|
||||
free(rb);
|
||||
}
|
||||
|
||||
char* qb_rb_name_get(qb_ringbuffer_t * rb)
|
||||
{
|
||||
return rb->shared_hdr->hdr_path;
|
||||
}
|
||||
|
||||
static size_t _qb_rb_space_free_locked_(qb_ringbuffer_t * rb)
|
||||
{
|
||||
uint32_t write_size;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user