#ifndef _RCI_H_
#define _RCI_H_

/* Definitions for the RCI kernel support code in rci.c */

#define TQ_MAX_SIZE	32	/* maximum size of time event queue */
#define TQ_DEFAULT_SIZE	2	/* default size of time event queue */

typedef struct {
	/* Describes an RCI timer event: when the event occured
	   (ticks), and which requests occured on that event (req). */

#define RCI_BEAT_READY	0x1
#define RCI_ALARM_READY	0x2
	int req;
	int tick;
} RciTimerEvent;

typedef struct {
	/* A queue of RCI timer events which have occured and are
	   waiting to be read by the user process. */

	RciTimerEvent buf[TQ_MAX_SIZE+1];
	int head;
	int tail;
	int size;
} RciTimerQueue;

/* Support macros for the RCI kernel code. */

#define TIMER_QUEUE_EMPTY(q)	((q)->head == (q)->tail)

#endif
