xref: /titanic_41/usr/src/uts/common/sys/fs/swapnode.h (revision 355b4669e025ff377602b6fc7caaf30dbc218371)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 #ifndef	_SYS_FS_SWAPNODE_H
32 #define	_SYS_FS_SWAPNODE_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * pointer to swapfs global data structures
42  */
43 extern pgcnt_t swapfs_minfree;		/* amount of availrmem (in pages) */
44 					/* that is unavailable to swapfs */
45 extern pgcnt_t swapfs_desfree;
46 
47 extern pgcnt_t swapfs_reserve;		/* amount of availrmem (in pages) */
48 					/* that is unavailable for swap */
49 					/* reservation to non-priv processes */
50 
51 extern struct vnodeops *swap_vnodeops;
52 extern struct vnode *swapfs_getvp(ulong_t);
53 
54 #ifdef SWAPFS_DEBUG
55 extern int swapfs_debug;
56 #define	SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)	\
57 	if (swapfs_debug & (X)) 		\
58 		printf(S, Y1, Y2, Y3, Y4, Y5);
59 #define	SWAP_SUBR	0x01
60 #define	SWAP_VOPS	0x02
61 #define	SWAP_VFSOPS	0x04
62 #define	SWAP_PGC		0x08
63 #define	SWAP_PUTP	0x10
64 #else	/* SWAPFS_DEBUG */
65 #define	SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)
66 #endif	/* SWAPFS_DEBUG */
67 
68 #ifdef	__cplusplus
69 }
70 #endif
71 
72 #endif	/* _SYS_FS_SWAPNODE_H */
73