313 #endif // _TN_DQUEUE_H
enum TN_RCode tn_queue_receive_polling(struct TN_DQueue *dque, void **pp_data)
The same as tn_queue_receive() with zero timeout.
struct TN_ListItem wait_receive_list
list of tasks waiting to receive data
struct TN_ListItem wait_send_list
list of tasks waiting to send data
enum TN_ObjId id_dque
id for object validity verification
enum TN_RCode tn_queue_ireceive_polling(struct TN_DQueue *dque, void **pp_data)
The same as tn_queue_receive() with zero timeout, but for using in the ISR.
Structure representing data queue object.
TN_RCode
Result code returned by kernel services.
enum TN_RCode tn_queue_send(struct TN_DQueue *dque, void *p_data, TN_Timeout timeout)
Send the data element specified by the p_data to the data queue specified by the dque.
void ** data_fifo
array of void * to store data queue items. Can be NULL.
DQueue-specific fields related to waiting task, to be included in struct TN_Task. ...
TN_ObjId
Magic number for object validity verification.
unsigned long TN_Timeout
The value representing maximum number of system ticks to wait.
Definitions used through the whole kernel.
int head_idx
index of the item which will be written next time
int filled_items_cnt
count of non-free items in data_fifo
int items_cnt
capacity (total items count). Can be 0.
void * data_elem
if task tries to send the data to the data queue, and there's no space in the queue, value to put to queue is stored in this field
int tail_idx
index of the item which will be read next time
enum TN_RCode tn_queue_create(struct TN_DQueue *dque, void **data_fifo, int items_cnt)
Construct data queue.
enum TN_RCode tn_queue_receive(struct TN_DQueue *dque, void **pp_data, TN_Timeout timeout)
Receive the data element from the data queue specified by the dque and place it into the address spec...
enum TN_RCode tn_queue_send_polling(struct TN_DQueue *dque, void *p_data)
The same as tn_queue_send() with zero timeout.
enum TN_RCode tn_queue_isend_polling(struct TN_DQueue *dque, void *p_data)
The same as tn_queue_send() with zero timeout, but for using in the ISR.
enum TN_RCode tn_queue_delete(struct TN_DQueue *dque)
Destruct data queue.