vmsystm.h revision 102033aa92edf302ad31b3bdd7c6fcd2d6910903
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _SYS_VMSYSTM_H
#define _SYS_VMSYSTM_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Miscellaneous virtual memory subsystem variables and structures.
*/
#ifdef _KERNEL
/* writable copies of tunables */
/*
* TRUE if the pageout daemon, fsflush daemon or the scheduler. These
* processes can't sleep while trying to free up memory since a deadlock
* will occur if they do sleep.
*/
/* insure non-zero */
#define nz(x) ((x) != 0 ? (x) : 1)
/*
* Flags passed by the swapper to swapout routines of each
* scheduling class.
*/
#define HARDSWAP 1
#define SOFTSWAP 2
/*
* Values returned by valid_usr_range()
*/
#define RANGE_OKAY (0)
#define RANGE_BADADDR (1)
#define RANGE_BADPROT (2)
/*
* map_pgsz: temporary - subject to change.
*/
#define MAPPGSZ_VA 0x01
#define MAPPGSZ_STK 0x02
#define MAPPGSZ_HEAP 0x04
#define MAPPGSZ_ISM 0x08
/*
* Flags for map_pgszcvec
*/
#define MAPPGSZC_SHM 0x01
#define MAPPGSZC_PRIVM 0x02
#define MAPPGSZC_STACK 0x04
#define MAPPGSZC_HEAP 0x08
struct as;
struct page;
struct anon;
extern int maxslp;
extern void swapout_lwp(klwp_t *);
int dir);
int memcntl);
extern void vmmeter(void);
extern int pf_is_memory(pfn_t);
extern void dcache_flushall(void);
extern size_t exec_get_spslew(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VMSYSTM_H */