/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident	"$Header: swap.h 1.11 89/08/07 $"

#ifndef	_SYS_SWAP_H_

/* $Log:	swap.h,v $
 */


/*	The following struct is used by the sysi86 system call.
 *	If the first argument to the sysi86 system call is 3,
 *	then the call pertains to the swap file.  In this case,
 *	the second argument is a pointer to a structure of the
 *	following format which contains the parameters for the
 *	operation to be performed.
 */

typedef struct swapint {
	char	si_cmd;		/* One of the command codes	*/
				/* listed below.		*/
	char	*si_buf;	/* For an SI_LIST function, this*/
				/* is a pointer to a buffer of	*/
				/* sizeof(swdevt)*MSFILES bytes.*/
				/* For the other cases, it is a	*/
				/* pointer to a pathname of a	*/
				/* swap file.			*/
	int	si_swplo;	/* not used. Always start at 0.	*/
	int	si_nblks;	/* size. if 0 use entire device */
} swpi_t;

/*	The following are the possible values for si_cmd.
 */

#define	SI_LIST		0	/* List the currently active	*/
				/* swap files.			*/
#define	SI_ADD		1	/* Add a new swap file.		*/
#define	SI_DEL		2	/* Not supported. Delete one of	*/
				/* the currently active swap	*/
				/* files.			*/

/*
 * Swap device information
 */
struct swdevt
{
	dev_t	sw_dev;
	int	sw_nblks;
	struct	dev *sw_devp;
};

#define	MSFILES		16		/* max number of entries in swdevt[] */

#ifdef	INKERNEL
extern	struct	swdevt swdevt[];
extern sema_t	swap_sema;
#endif	/* INKERNEL */

#define	_SYS_SWAP_H_
#endif	/* _SYS_SWAP_H_ */
