macsim/src/noc/msgqueue.c
// Add a queue to the end of another queue
Add a queue to the end of another queue
Add a queue to the end of another queue
void msg_cat_queue(msg_queue_t *base, msg_queue_t *add)
{
    if (base->tail)
    {
	base->tail->next = add->head;
	if (add->tail)
	    base->tail = add->tail;
	base->count += add->count;
    }
    else
    {
	base->head = add->head;
	base->tail = add->tail;
	base->count = add->count;
    }
}
void msg_cat_queue ( msg_queue_t * base , msg_queue_t * add ) { if ( base -> tail ) { base -> tail -> next = add -> head ; if ( add -> tail ) base -> tail = add -> tail ; base -> count += add -> count ; } else { base -> head = add -> head ; base -> tail = add -> tail ; base -> count = add -> count ; } }
Add a queue to the end of another queue
Add a queue to the end of another queue