37#define Q_TIMEOUT MSG_TIMEOUT
38#define Q_RESET MSG_RESET
39#define Q_EMPTY MSG_TIMEOUT
40#define Q_FULL MSG_TIMEOUT
129 ((size_t)((qp)->q_top - (qp)->q_buffer)) \
142#define qSpaceI(qp) ((qp)->q_counter)
153#define qGetLink(qp) ((qp)->q_link)
164#define qSetLink(qp, lk) ((qp)->q_link = lk)
175#define iqGetFullI(iqp) qSpaceI(iqp)
186#define iqGetEmptyI(iqp) (qSizeX(iqp) - qSpaceI(iqp))
198#define iqIsEmptyI(iqp) ((bool)(qSpaceI(iqp) == 0U))
210#define iqIsFullI(iqp) \
212 ((bool)(((iqp)->q_wrptr == (iqp)->q_rdptr) && ((iqp)->q_counter != 0U))) \
227#define iqGet(iqp) iqGetTimeout(iqp, TIME_INFINITE)
238#define oqGetFullI(oqp) (qSizeX(oqp) - qSpaceI(oqp))
249#define oqGetEmptyI(oqp) qSpaceI(oqp)
261#define oqIsEmptyI(oqp) \
263 ((bool)(((oqp)->q_wrptr == (oqp)->q_rdptr) && ((oqp)->q_counter != 0U))) \
276#define oqIsFullI(oqp) ((bool)(qSpaceI(oqp) == 0U))
292#define oqPut(oqp, b) oqPutTimeout(oqp, b, TIME_INFINITE)
io_queue_t output_queue_t
Type of an output queue structure.
msg_t iqGetI(input_queue_t *iqp)
Input queue non-blocking read.
io_queue_t input_queue_t
Type of an input queue structure.
void iqResetI(input_queue_t *iqp)
Resets an input queue.
size_t oqWriteTimeout(output_queue_t *oqp, const uint8_t *bp, size_t n, sysinterval_t timeout)
Output queue write with timeout.
msg_t oqPutI(output_queue_t *oqp, uint8_t b)
Output queue non-blocking write.
void iqObjectInit(input_queue_t *iqp, uint8_t *bp, size_t size, qnotify_t infy, void *link)
Initializes an input queue.
msg_t iqGetTimeout(input_queue_t *iqp, sysinterval_t timeout)
Input queue read with timeout.
msg_t iqPutI(input_queue_t *iqp, uint8_t b)
Input queue write.
size_t oqWriteI(output_queue_t *oqp, const uint8_t *bp, size_t n)
Output queue non-blocking write.
void oqResetI(output_queue_t *oqp)
Resets an output queue.
void(* qnotify_t)(io_queue_t *qp)
Queue notification callback type.
size_t iqReadTimeout(input_queue_t *iqp, uint8_t *bp, size_t n, sysinterval_t timeout)
Input queue read with timeout.
msg_t oqPutTimeout(output_queue_t *oqp, uint8_t b, sysinterval_t timeout)
Output queue write with timeout.
void oqObjectInit(output_queue_t *oqp, uint8_t *bp, size_t size, qnotify_t onfy, void *link)
Initializes an output queue.
msg_t oqGetI(output_queue_t *oqp)
Output queue read.
struct io_queue io_queue_t
Type of a generic I/O queue structure.
size_t iqReadI(input_queue_t *iqp, uint8_t *bp, size_t n)
Input queue non-blocking read.
int32_t msg_t
Type of a message.
uint32_t sysinterval_t
Type of system time interval.
Generic I/O queue structure.
qnotify_t q_notify
Data notification callback.
uint8_t * q_buffer
Pointer to the queue buffer.
uint8_t * q_wrptr
Write pointer.
threads_queue_t q_waiting
Queue of waiting threads.
uint8_t * q_rdptr
Read pointer.
uint8_t * q_top
Pointer to the first location after the buffer.
void * q_link
Application defined field.
volatile size_t q_counter
Resources counter.