/*	@(#)queue.h	13.1 (RC International) 91/02/02	*/
#ifndef	_RTE_QUEUE_
#define _RTE_QUEUE_

#ifdef	LANGUAGE_ASSEMBLY

#include "rte_assym.h"

#else	!LANGUAGE_ASSEMBLY

typedef struct msg
{
    struct msg	*link;
} MSG;

/*
 * queue structure definition
 * 
 * 	WARNING -- the following positional eqivalences must be preserved
 *
 *		field		field with same position
 *		-----		------------------------
 *		oldest_proc	link in RTE process
 *		newest_proc	back_link in RTE process
 *		on_event_list	on_event_list in RTE process
 */

typedef	struct queue
{
	struct process  *oldest_proc;   /* process list head */
	struct process  *newest_proc;   /* process list tail */
	char		p_processor;	/* filler */
	char		on_event_list;  /* always TRUE */
	MSG             *oldest_msg;    /* message list head */
	MSG             *newest_msg;    /* message list tail */
	short           proc_count;     /* number of processes queued */
	short           msg_count;      /* number of messages queued */
	unsigned	q_magic;	/* magic word */
} QUEUE;

#define			NULL_QUEUE	((QUEUE *) 0)
#define			NULL_MSG	((MSG *) 0)
#define			QUEUE_MAGIC	0x3ea11ae3

#endif	!LANGUAGE_ASSEMBLY
#endif _RTE_QUEUE_
