18 #ifndef _XENOMAI_ALCHEMY_BUFFER_H 19 #define _XENOMAI_ALCHEMY_BUFFER_H 22 #include <alchemy/timer.h> 37 typedef struct RT_BUFFER RT_BUFFER;
68 char name[XNOBJECT_NAME_LEN];
85 const void *ptr,
size_t size,
86 const struct timespec *abs_timeout);
90 const void *ptr,
size_t size,
95 alchemy_abs_timeout(timeout, &ts));
100 const void *ptr,
size_t size,
105 alchemy_rel_timeout(timeout, &ts));
109 void *ptr,
size_t size,
110 const struct timespec *abs_timeout);
114 void *ptr,
size_t size,
119 alchemy_abs_timeout(timeout, &ts));
124 void *ptr,
size_t size,
129 alchemy_rel_timeout(timeout, &ts));
138 const char *name, RTIME timeout);
int rt_buffer_create(RT_BUFFER *bf, const char *name, size_t bufsz, int mode)
Create an IPC buffer.
Definition: buffer.c:214
int rt_buffer_clear(RT_BUFFER *bf)
Clear an IPC buffer.
Definition: buffer.c:829
int rt_buffer_unbind(RT_BUFFER *bf)
Unbind from an IPC buffer.
Definition: buffer.c:967
size_t availmem
Amount of memory currently available for holding more data.
Definition: buffer.h:64
ssize_t rt_buffer_read_timed(RT_BUFFER *bf, void *ptr, size_t size, const struct timespec *abs_timeout)
Read from an IPC buffer.
Definition: buffer.c:462
int rt_buffer_delete(RT_BUFFER *bf)
Delete an IPC buffer.
Definition: buffer.c:309
int iwaiters
Number of tasks waiting on the read side of the buffer for input data.
Definition: buffer.h:51
static ssize_t rt_buffer_write_until(RT_BUFFER *bf, const void *ptr, size_t size, RTIME timeout)
Write to an IPC buffer (with absolute scalar timeout).
Definition: buffer.h:89
static ssize_t rt_buffer_read(RT_BUFFER *bf, void *ptr, size_t size, RTIME timeout)
Read from an IPC buffer (with relative scalar timeout).
Definition: buffer.h:123
ssize_t rt_buffer_write_timed(RT_BUFFER *bf, const void *ptr, size_t size, const struct timespec *abs_timeout)
Write to an IPC buffer.
Definition: buffer.c:688
int rt_buffer_bind(RT_BUFFER *bf, const char *name, RTIME timeout)
Bind to an IPC buffer.
Definition: buffer.c:944
size_t totalmem
Overall size of buffer (in bytes).
Definition: buffer.h:60
static ssize_t rt_buffer_read_until(RT_BUFFER *bf, void *ptr, size_t size, RTIME timeout)
Read from an IPC buffer (with absolute scalar timeout).
Definition: buffer.h:113
Buffer status descriptor.
Definition: buffer.h:46
int owaiters
Number of tasks waiting on the write side of the buffer for sending out data.
Definition: buffer.h:56
static ssize_t rt_buffer_write(RT_BUFFER *bf, const void *ptr, size_t size, RTIME timeout)
Write to an IPC buffer (with relative scalar timeout).
Definition: buffer.h:99
char name[XNOBJECT_NAME_LEN]
Name of the buffer.
Definition: buffer.h:68
int rt_buffer_inquire(RT_BUFFER *bf, RT_BUFFER_INFO *info)
Query buffer status.
Definition: buffer.c:874