Exemple #1
0
unsigned long ring_buffer_free_bytes(struct ring_buffer *buffer)
{
	return buffer->count_bytes - ring_buffer_filled_bytes(buffer);
}
Exemple #2
0
int ring_buffer_unused_space(ring_buffer_t *rbuffer)
{
    int used = ring_buffer_filled_bytes(rbuffer);
    return rbuffer->size - used;
}