# ifndef NO_WHAT
/*
 *      SCCS file type - Emulator Include File
 *
 *      What identification string:
 */
static char *_S_hEBC = "@(#)EBC.h	3.1";
# endif

/****************************************************************
 *      EBC.h contains the defines and declarations             *
 *      for variables in the buffer cache.                      *
 ****************************************************************/

/*
 *  BufferLinkIndex   :  0 .. NIOBUFFERS ;
 *  BufferIndex       :  1 .. NIOBUFFERS ;
 */
	translate(BufferLinkIndex, int);
	translate(BufferIndex,     int);

/*
 * Link structure
 */
	typedef struct  {
		BufferLinkIndex  B_Fresh;
		BufferLinkIndex  B_Stale;
	} BufferLink;

/*
 * Buffer structure
 */
	typedef struct  {
		SEID         B_File;
		fBlockNumber B_Block;
		boolean      B_Busy;
		boolean      B_Flush;
                boolean      B_Dirty;
		SEID         B_Writer;
		int          B_WriteOD;
		char	     B_Data[512];
	}  Buffer;

/*
 * Buffer Cache structure
 */
	typedef struct  {
		SHARED

		t_FProcTab_index  OP_WAIT;
		t_FProcTab_index  BUF_WAIT;
		BufferLink   B_Link[NIOBUFFERS+1];
		Buffer       Buf[NIOBUFFERS+1];
	} BufferCache;

	/*
	 * EBC_lk structrure
	*/
		typedef struct {
			SHARED

			int io_lock;
		} EBC_lk;

/*
 * Enumeration type for specifying which end of the buffer (de)queue
 * is to be accessed:
 */
translate(FRESH,0)
translate(STALE,1)
