59 #ifndef __RKHQUEUE_H__
60 #define __RKHQUEUE_H__
83 #define RKH_QUEUE_IS_EMPTY(q) \
84 (rbool_t)(rkh_queue_get_num((RKH_QUEUE_T *)(q)) == 0)
96 #if RKH_CFG_QUE_SIZEOF_NELEM == 8
98 #elif RKH_CFG_QUE_SIZEOF_NELEM == 16
100 #elif RKH_CFG_QUE_SIZEOF_NELEM == 32
112 RKH_QUE_OK, RKH_QUE_EMPTY, RKH_QUE_FULL
126 typedef struct RKH_QINFO_T
223 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
232 #if RKH_CFG_QUE_GET_INFO_EN == RKH_ENABLED
RKH_QUENE_T rkh_queue_get_lwm(RKH_QUEUE_T *q)
This function returns the lowest number of free elements ever present in the pool....
void rkh_queue_put_lifo(RKH_QUEUE_T *q, const void *pe)
Puts an element on a queue in a LIFO manner. The element is queued by reference, not by copy.
ruint rkh_queue_read(RKH_QUEUE_T *q, void *pe)
Read an element from a queue without remove it.
void rkh_queue_deplete(RKH_QUEUE_T *q)
Depletes a queue. Empties the contents of the queue and eliminates all stored elements.
void rkh_queue_init(RKH_QUEUE_T *q, const void **sstart, RKH_QUENE_T ssize, void *sma)
Initializes the previously allocated queue data structure RKH_QUEUE_T.
rbool_t rkh_queue_is_full(RKH_QUEUE_T *q)
This function query the queue.
void rkh_queue_put_fifo(RKH_QUEUE_T *q, const void *pe)
Puts an element on a queue in a FIFO manner. The element is queued by reference, not by copy.
void * rkh_queue_get(RKH_QUEUE_T *q)
Get and remove an element from a queue.
RKH_QUENE_T rkh_queue_get_num(RKH_QUEUE_T *q)
Returns the number of elements currently in the queue.
void rkh_queue_clear_info(RKH_QUEUE_T *q)
Clear performance information for a particular queue.
void rkh_queue_get_info(RKH_QUEUE_T *q, RKH_QUEI_T *pqi)
Retrieves performance information for a particular queue.
RKH_QUECODE_T
Return codes from queue operations.
rui8_t RKH_QUENE_T
This data type defines the maximum number of elements that any queue can contain.
Defines the data types that uses RKH.
Defines the data structure into which the performance information for queues is stored.
Defines the data structure used to maintain information about the queue.
RKH_QUENE_T nelems
Number of elements.
void ** pend
Points to the end of the queue storage area.
RKH_QUENE_T nmin
Minimum number of free elements ever in this queue. The nmin low-watermark provides valuable empirica...
void ** pout
Points to the free next place in the storage area.
const struct RKH_SMA_T * sma
Points to the associated SMA (a.k.a Active Object) that receives the enqueued events.
const void ** pstart
Points to beginning of the queue storage area.
RKH_QUEI_T rqi
Performance information. This member is optional, thus it could be eliminated in compile-time with RK...
void ** pin
Points to the next place of queued item.
RKH_QUENE_T qty
Number of elements currently in the queue.
Describes the SMA (active object in UML).