Logo Search packages:      
Sourcecode: jamin version File versions

ringbuffer.h File Reference


Detailed Description

A set of library functions to make lock-free ringbuffers available to JACK clients. The `capture_client.c' (in the example_clients directory) is a fully functioning user of this API.

The key attribute of a ringbuffer is that it can be safely accessed by two threads simultaneously -- one reading from the buffer and the other writing to it -- without using any synchronization or mutual exclusion primitives. For this to work correctly, there can only be a single reader and a single writer thread. Their identities cannot be interchanged.

Definition in file ringbuffer.h.

#include <sys/types.h>

Go to the source code of this file.

Classes

struct  jack_ringbuffer_data_t
struct  jack_ringbuffer_t

Functions

jack_ringbuffer_t * jack_ringbuffer_create (size_t sz)
void jack_ringbuffer_free (jack_ringbuffer_t *rb)
void jack_ringbuffer_get_read_vector (const jack_ringbuffer_t *rb, jack_ringbuffer_data_t *vec)
void jack_ringbuffer_get_write_vector (const jack_ringbuffer_t *rb, jack_ringbuffer_data_t *vec)
int jack_ringbuffer_mlock (jack_ringbuffer_t *rb)
size_t jack_ringbuffer_read (jack_ringbuffer_t *rb, char *dest, size_t cnt)
void jack_ringbuffer_read_advance (jack_ringbuffer_t *rb, size_t cnt)
size_t jack_ringbuffer_read_space (const jack_ringbuffer_t *rb)
void jack_ringbuffer_reset (jack_ringbuffer_t *rb)
size_t jack_ringbuffer_write (jack_ringbuffer_t *rb, const char *src, size_t cnt)
void jack_ringbuffer_write_advance (jack_ringbuffer_t *rb, size_t cnt)
size_t jack_ringbuffer_write_space (const jack_ringbuffer_t *rb)


Generated by  Doxygen 1.6.0   Back to index