75 memcpy((
void *)bp, (
void *)iqp->
q_rdptr, n);
79 memcpy((
void *)bp, (
void *)iqp->
q_rdptr, s1);
82 memcpy((
void *)bp, (
void *)iqp->
q_buffer, s2);
86 memcpy((
void *)bp, (
void *)iqp->
q_rdptr, n);
123 memcpy((
void *)oqp->
q_wrptr, (
const void *)bp, n);
127 memcpy((
void *)oqp->
q_wrptr, (
const void *)bp, s1);
130 memcpy((
void *)oqp->
q_buffer, (
const void *)bp, s2);
134 memcpy((
void *)oqp->
q_wrptr, (
const void *)bp, n);
185 iqp->
q_top = bp + size;
358 if ((rd > (
size_t)0) && (nfy != NULL)) {
402 if (done == (
size_t)0) {
454 oqp->
q_top = bp + size;
627 if ((wr > (
size_t)0) && (nfy != NULL)) {
671 if (done == (
size_t)0) {
Generic I/O queue structure.
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.
void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg)
Dequeues and wakes up all threads from the queue.
#define oqIsEmptyI(oqp)
Evaluates to true if the specified output queue is empty.
void oqObjectInit(output_queue_t *oqp, uint8_t *bp, size_t size, qnotify_t onfy, void *link)
Initializes an output queue.
size_t iqReadI(input_queue_t *iqp, uint8_t *bp, size_t n)
Input queue non-blocking read.
uint8_t * q_wrptr
Write pointer.
#define iqIsEmptyI(iqp)
Evaluates to true if the specified input queue is empty.
void iqResetI(input_queue_t *iqp)
Resets an input queue.
static size_t iq_read(input_queue_t *iqp, uint8_t *bp, size_t n)
Non-blocking input queue read.
#define osalDbgCheckClassI()
I-Class state check.
#define iqIsFullI(iqp)
Evaluates to true if the specified input queue is full.
void oqResetI(output_queue_t *oqp)
Resets an output queue.
#define qSizeX(qp)
Returns the queue's buffer size.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
uint8_t * q_top
Pointer to the first location after the buffer.
threads_queue_t q_waiting
Queue of waiting threads.
#define iqGetFullI(iqp)
Returns the filled space into an input queue.
#define oqGetEmptyI(oqp)
Returns the empty space into an output queue.
int32_t msg_t
Type of a message.
void(* qnotify_t)(io_queue_t *qp)
Queue notification callback type.
void * q_link
Application defined field.
size_t oqWriteTimeout(output_queue_t *oqp, const uint8_t *bp, size_t n, sysinterval_t timeout)
Output queue write with timeout.
uint8_t * q_buffer
Pointer to the queue buffer.
#define oqIsFullI(oqp)
Evaluates to true if the specified output queue is full.
msg_t oqPutTimeout(output_queue_t *oqp, uint8_t b, sysinterval_t timeout)
Output queue write with timeout.
#define osalDbgCheck(c)
Function parameters check.
uint32_t sysinterval_t
Type of system time interval.
static size_t oq_write(output_queue_t *oqp, const uint8_t *bp, size_t n)
Non-blocking output queue write.
void osalThreadDequeueNextI(threads_queue_t *tqp, msg_t msg)
Dequeues and wakes up one thread from the queue, if any.
msg_t osalThreadEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout)
Enqueues the caller thread.
msg_t oqGetI(output_queue_t *oqp)
Output queue read.
static void osalSysLock(void)
Enters a critical zone from thread context.
msg_t oqPutI(output_queue_t *oqp, uint8_t b)
Output queue non-blocking write.
msg_t iqPutI(input_queue_t *iqp, uint8_t b)
Input queue write.
volatile size_t q_counter
Resources counter.
uint8_t * q_rdptr
Read pointer.
qnotify_t q_notify
Data notification callback.
msg_t iqGetI(input_queue_t *iqp)
Input queue non-blocking read.
size_t iqReadTimeout(input_queue_t *iqp, uint8_t *bp, size_t n, sysinterval_t timeout)
Input queue read with timeout.
size_t oqWriteI(output_queue_t *oqp, const uint8_t *bp, size_t n)
Output queue non-blocking write.
static void osalThreadQueueObjectInit(threads_queue_t *tqp)
Initializes a threads queue object.