18 #ifndef _XENOMAI_ALCHEMY_QUEUE_H 19 #define _XENOMAI_ALCHEMY_QUEUE_H 22 #include <alchemy/timer.h> 40 #define Q_BROADCAST 0x2 46 typedef struct RT_QUEUE RT_QUEUE;
84 char name[XNOBJECT_NAME_LEN];
106 const void *buf,
size_t size,
int mode);
108 int rt_queue_write(RT_QUEUE *queue,
109 const void *buf,
size_t size,
int mode);
113 const struct timespec *abs_timeout);
117 void **bufp, RTIME timeout)
121 alchemy_abs_timeout(timeout, &ts));
126 void **bufp, RTIME timeout)
130 alchemy_rel_timeout(timeout, &ts));
134 void *buf,
size_t size,
135 const struct timespec *abs_timeout);
139 void *buf,
size_t size, RTIME timeout)
143 alchemy_abs_timeout(timeout, &ts));
148 void *buf,
size_t size, RTIME timeout)
152 alchemy_rel_timeout(timeout, &ts));
size_t poolsize
Size of memory pool for holding message buffers (in bytes).
Definition: queue.h:76
size_t qlimit
Maximum number of messages in queue, zero if unlimited.
Definition: queue.h:72
Queue status descriptor.
Definition: queue.h:55
static ssize_t rt_queue_receive_until(RT_QUEUE *queue, void **bufp, RTIME timeout)
Receive from a queue (with absolute scalar timeout).
Definition: queue.h:116
int rt_queue_bind(RT_QUEUE *queue, const char *name, RTIME timeout)
Bind to a message queue.
Definition: queue.c:1163
int rt_queue_unbind(RT_QUEUE *queue)
Unbind from a message queue.
Definition: queue.c:1185
int rt_queue_create(RT_QUEUE *queue, const char *name, size_t poolsize, size_t qlimit, int mode)
Create a message queue.
Definition: queue.c:204
int mode
Queue mode bits, as given to rt_queue_create().
Definition: queue.h:68
int nwaiters
Number of tasks currently waiting on the queue for messages.
Definition: queue.h:60
size_t usedmem
Amount of memory consumed from the buffer pool.
Definition: queue.h:80
void * rt_queue_alloc(RT_QUEUE *queue, size_t size)
Allocate a message buffer.
Definition: queue.c:354
int rt_queue_delete(RT_QUEUE *queue)
Delete a message queue.
Definition: queue.c:309
int rt_queue_inquire(RT_QUEUE *queue, RT_QUEUE_INFO *info)
Query queue status.
Definition: queue.c:1092
ssize_t rt_queue_receive_timed(RT_QUEUE *queue, void **bufp, const struct timespec *abs_timeout)
Receive a message from a queue (with absolute timeout date).
Definition: queue.c:797
ssize_t rt_queue_read_timed(RT_QUEUE *queue, void *buf, size_t size, const struct timespec *abs_timeout)
Read from a queue.
Definition: queue.c:953
char name[XNOBJECT_NAME_LEN]
Name of message queue.
Definition: queue.h:84
int rt_queue_send(RT_QUEUE *queue, const void *buf, size_t size, int mode)
Send a message to a queue.
Definition: queue.c:502
int rt_queue_flush(RT_QUEUE *queue)
Flush pending messages from a queue.
Definition: queue.c:1036
int nmessages
Number of messages pending in queue.
Definition: queue.h:64
static ssize_t rt_queue_read_until(RT_QUEUE *queue, void *buf, size_t size, RTIME timeout)
Read from a queue (with absolute scalar timeout).
Definition: queue.h:138
int rt_queue_free(RT_QUEUE *queue, void *buf)
Free a message buffer.
Definition: queue.c:408
static ssize_t rt_queue_receive(RT_QUEUE *queue, void **bufp, RTIME timeout)
Receive from a queue (with relative scalar timeout).
Definition: queue.h:125
static ssize_t rt_queue_read(RT_QUEUE *queue, void *buf, size_t size, RTIME timeout)
Read from a queue (with relative scalar timeout).
Definition: queue.h:147