arm_ucos/src/common/queue.c
/********************************************************************/
/* 
 * Add an item to the end of the queue 
 *
 * Parameters:
 *  q       Pointer to queue structure
 *  node    New node to add to the queue
 */
Add an item to the end of the queue

q       Pointer to queue structure
node    New node to add to the queue
Add an item to the end of the queue q Pointer to queue structure node New node to add to the queue
void
queue_add(QUEUE *q, QNODE *node)
{
    if (queue_isempty(q))
    {
        q->head = q->tail = node;
    }
    else
    {
        q->tail->next = node;
        q->tail = node;
    }
    node->next = NULL;
}
void queue_add ( QUEUE * q , QNODE * node ) { if ( queue_isempty ( q ) ) { q -> head = q -> tail = node ; } else { q -> tail -> next = node ; q -> tail = node ; } node -> next = NULL ; }
Add an item to the end of the queue
Add an item to the end of the queue