arm_ucos/src/common/queue.c
/********************************************************************/
/* 
 * Move entire contents of one queue to the other
 *
 * Parameters:
 *  src     Pointer to source queue
 *  dst     Pointer to destination queue
 */
Move entire contents of one queue to the other

src     Pointer to source queue
dst     Pointer to destination queue
Move entire contents of one queue to the other src Pointer to source queue dst Pointer to destination queue
void
queue_move(QUEUE *dst, QUEUE *src)
{
    if (queue_isempty(src))
        return;
    if (queue_isempty(dst))
        dst->head = src->head;
    else
        dst->tail->next = src->head;
    dst->tail = src->tail;
    src->head = NULL;
    return;
}
void queue_move ( QUEUE * dst , QUEUE * src ) { if ( queue_isempty ( src ) ) return ; if ( queue_isempty ( dst ) ) dst -> head = src -> head ; else dst -> tail -> next = src -> head ; dst -> tail = src -> tail ; src -> head = NULL ; return ; }
Move entire contents of one queue to the other
Move entire contents of one queue to the other