/* Function: void msgqueue_initialise(MsgQueue_t *msgq) Purpose : initialise a message queue Params : msgq - queue to initialise  */
void msgqueue_initialise(MsgQueue_t *msgq)
/* Function: void msgqueue_initialise(MsgQueue_t *msgq) Purpose : initialise a message queue Params : msgq - queue to initialise  */
void msgqueue_initialise(MsgQueue_t *msgq)
{
	int i;
	msgq->qe = NULL;
	msgq->free = &msgq->entries[0];
	for (i = 0; i < NR_MESSAGES; i++)
		msgq->entries[i].next = &msgq->entries[i + 1];
	msgq->entries[NR_MESSAGES - 1].next = NULL;
}