/*static char *SCCSID = "@(#)pr_read.h	6.10 92/01/31";*/
/* Prototypes for all READ\ functions */

#if defined(PERFVIEW) && !defined(PVWDEF)
#include <pvwxport.h>
#include "pvw.h"
#endif

	extern PNOTEREC CNR (PFRAME pfrm);

	extern USHORT CSecXfer (PLSN plsn,
			PULONG pculRunLen,
			PBUFNODE pbuf,
			PBYTE far *ppbXferAddr,
			PUSHORT pcusXfer,
			PBUFNODE far *ppbufLastUsed,
			PFRAME pfrm);

	extern USHORT ReadDir (LSN vlsnStart,
			ULONG culRunLen,
			PBYTE far *ppbDest,
			PUSHORT pcusXfer,
			PNOTEREC pNoteRec,
			PBYTE pbEventFlags,
			PFRAME pfrm);

	extern VOID RNM (PNOTEREC pnot,
			 BOOL bWrite,
			 PFRAME pfrm);


	extern USHORT CachXfer (PLSN plsnFirst,
			PUSHORT pcusReq,
			PULONG pculRunLen,
			PULONG pulSeekPtr,
			PBYTE far *ppbClientData,
			PBUFNODE far *ppbufLastByte,
			PFRAME pfrm);

	extern LSN CPS_ (ULONG ulSeekPtr,
			ALBLK far *palb,
			PULONG pculContig,
			PULONG pulRunLen,
			PLSN plsnPhysStartRun,
         BOOL fDASDOpen,
			PFRAME pfrm);


#ifdef PERFVIEW
		/* Keep track of file accesses, via OFT or via */
		/* allocation tree */

#define DO_PVW_CPS(poft)					\
		( PVWINC(FA,Count),				\
		  (!((poft)->fst.alb.bFlag & ABF_NODE)) ?	\
		    PVWINC(FA,Oft): 0 ),
#else
#define DO_PVW_CPS(poft)
#endif


#define CPS(ulSeekPtr, poft, pulContig, pfrm)			\
	   (DO_PVW_CPS(poft)					\
	   CPS_(ulSeekPtr, &(poft)->fst.alb, pulContig,		\
		NULL, NULL, poft->bSFlag & OFS_DASD, pfrm))


#define RdBufCPS(ulSeekPtr,poft,pulContig,pulRunLen,plsnPhysStartRun,pfrm)   \
		(DO_PVW_CPS(poft)					     \
		CPS_(ulSeekPtr, &(poft)->fst.alb, pulContig,		     \
		     pulRunLen, plsnPhysStartRun, poft->bSFlag & OFS_DASD, pfrm))

	extern LSN far CPS_Far (ULONG ulSeekPtr,
			ALBLK far *palb,
			PULONG pculContig,
         BOOL fDASDOpen,
			PFRAME pfrm);

#define CPSFar(ulSeekPtr, poft, pulContig, pfrm)			 \
		     CPS_Far(ulSeekPtr,&(poft)->fst.alb,pulContig,poft->bSFlag & OFS_DASD,pfrm)

	extern PBUFNODE GetIOHdr (void);

	extern USHORT SDR (USHORT cusTrans,
			ULONG ulSeekPtr,
			PBYTE pbXferAddr,
			BOOL  fSectorIO,
			PFHT pfht,
			PFRAME pfrm);

	extern UINT QRead (LSN	    lsn,
			USHORT	 cSects,
			PBYTE	 pbData,
			PNOTEREC pNoteRec,
			PBYTE	 pbEventFlags,
			PFRAME pfrm);

#ifdef FNV
	extern FNV IO_Notify (void);
#endif
