/*static char *SCCSID = "@(#)smexport.h 6.2 92/03/15";*/
/*      SCCSID = @(#)smexport.h 6.2 92/03/15          */
/*
 *       IBM/Microsoft Confidential
 *
 *       Copyright (c) IBM Corporation 1987, 1989
 *       Copyright (c) Microsoft Corporation 1987, 1989
 *
 *       All Rights Reserved
 */

#define SM_HE_TYPE        HEFSHMessage
#define SM_ALLOWED_FLAGS  (ALLOWED_ABORT | ALLOWED_IGNORE | 0x80)

/*XLATOFF*/

extern ulong_t  SMcDFInuse;
extern ulong_t  SMMinFree;
extern ulong_t  SMcInMemFile;
extern uchar_t *SMpInMemFile;
extern ulong_t  SMCFGMinFree;
extern ulong_t  SMCFGSwapSize;
extern uchar_t  SMswapping;

extern ulong_t SMSwapSpace;
extern ulong_t SMPageSemHeld;
extern ushort_t SMCompactSlot;
extern uchar_t SMMaxPageCmds;
unsigned SMSwapOut (struct pf_s *pPF);
unsigned SMSwapIn (ulong_t iDF, ulong_t frame);
unsigned SMRequestSwapSpace (ulong_t nRequested);
unsigned SMSetSwapSpace( ulong_t nRequested, ulong_t fNoBlock);
void     SMCompact(void);
unsigned SMQuerySwapSpace (ulong_t *pPageCnt);
void     SMInit (char *szSwapPath);
void     SMFreeDF(ulong_t iDF);

// compression variables and defines

#define SM_COMPRESSION_FLAG      0x80000
#define SM_COMPRESSION_FLAG_MSK  (SM_COMPRESSION_FLAG -1)
#define SM_MAX_COMPRESSED_SIZE 0x100
#define SM_MAX_COMPRESSED_ENTRIES 0x100

extern uchar_t *smpHeapComp;
extern uchar_t smbmComp[ SM_MAX_COMPRESSED_ENTRIES / 8];

extern ulong_t smCompress(register uchar_t *psrc, register uchar_t *ptgt);
extern void    smDecompress(register uchar_t *psrc, register uchar_t *ptgt);
extern ulong_t SMCompNextIndex;
extern ulong_t *SMpCompTbl;
extern uchar_t *SMpCompBase;
extern ulong_t *SMpFreeCompDFs;
// end compression

