arm_ucos/src/common/queue.c
/********************************************************************/
/* 
 * Remove and return first (oldest) entry from the specified queue 
 *
 * Parameters:
 *  q       Pointer to queue structure
 *
 * Return Value:
 *  Node at head of queue - NULL if queue is empty
 */
Remove and return first (oldest) entry from the specified queue

q       Pointer to queue structure

Return Value:
Node at head of queue - NULL if queue is empty
Remove and return first ( oldest ) entry from the specified queue q Pointer to queue structure Return Value : Node at head of queue - NULL if queue is empty
QNODE*
queue_remove(QUEUE *q)
{
    QNODE *oldest;
    if (queue_isempty(q))
        return NULL;
    oldest = q->head;
    q->head = oldest->next;
    return oldest;
}
QNODE * queue_remove ( QUEUE * q ) { QNODE * oldest ; if ( queue_isempty ( q ) ) return NULL ; oldest = q -> head ; q -> head = oldest -> next ; return oldest ; }
Remove and return first (oldest) entry from the specified queue
Remove and return first ( oldest ) entry from the specified queue