xref: /minix3/sys/uvm/uvm_pdaemon.h (revision 6c8f7fc3bac7ab5f78ee27de8bed706631d8c836)
1*6c8f7fc3SBen Gras /*	$NetBSD: uvm_pdaemon.h,v 1.17 2011/02/02 15:25:27 chuck Exp $	*/
2*6c8f7fc3SBen Gras 
3*6c8f7fc3SBen Gras /*
4*6c8f7fc3SBen Gras  * Copyright (c) 1997 Charles D. Cranor and Washington University.
5*6c8f7fc3SBen Gras  * Copyright (c) 1991, 1993, The Regents of the University of California.
6*6c8f7fc3SBen Gras  *
7*6c8f7fc3SBen Gras  * All rights reserved.
8*6c8f7fc3SBen Gras  *
9*6c8f7fc3SBen Gras  * This code is derived from software contributed to Berkeley by
10*6c8f7fc3SBen Gras  * The Mach Operating System project at Carnegie-Mellon University.
11*6c8f7fc3SBen Gras  *
12*6c8f7fc3SBen Gras  * Redistribution and use in source and binary forms, with or without
13*6c8f7fc3SBen Gras  * modification, are permitted provided that the following conditions
14*6c8f7fc3SBen Gras  * are met:
15*6c8f7fc3SBen Gras  * 1. Redistributions of source code must retain the above copyright
16*6c8f7fc3SBen Gras  *    notice, this list of conditions and the following disclaimer.
17*6c8f7fc3SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
18*6c8f7fc3SBen Gras  *    notice, this list of conditions and the following disclaimer in the
19*6c8f7fc3SBen Gras  *    documentation and/or other materials provided with the distribution.
20*6c8f7fc3SBen Gras  * 3. Neither the name of the University nor the names of its contributors
21*6c8f7fc3SBen Gras  *    may be used to endorse or promote products derived from this software
22*6c8f7fc3SBen Gras  *    without specific prior written permission.
23*6c8f7fc3SBen Gras  *
24*6c8f7fc3SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25*6c8f7fc3SBen Gras  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26*6c8f7fc3SBen Gras  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27*6c8f7fc3SBen Gras  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28*6c8f7fc3SBen Gras  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29*6c8f7fc3SBen Gras  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30*6c8f7fc3SBen Gras  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31*6c8f7fc3SBen Gras  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32*6c8f7fc3SBen Gras  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33*6c8f7fc3SBen Gras  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34*6c8f7fc3SBen Gras  * SUCH DAMAGE.
35*6c8f7fc3SBen Gras  *
36*6c8f7fc3SBen Gras  *	@(#)vm_pageout.h        8.2 (Berkeley) 1/12/94
37*6c8f7fc3SBen Gras  * from: Id: uvm_pdaemon.h,v 1.1.2.4 1998/02/02 20:07:20 chuck Exp
38*6c8f7fc3SBen Gras  *
39*6c8f7fc3SBen Gras  *
40*6c8f7fc3SBen Gras  * Copyright (c) 1987, 1990 Carnegie-Mellon University.
41*6c8f7fc3SBen Gras  * All rights reserved.
42*6c8f7fc3SBen Gras  *
43*6c8f7fc3SBen Gras  * Permission to use, copy, modify and distribute this software and
44*6c8f7fc3SBen Gras  * its documentation is hereby granted, provided that both the copyright
45*6c8f7fc3SBen Gras  * notice and this permission notice appear in all copies of the
46*6c8f7fc3SBen Gras  * software, derivative works or modified versions, and any portions
47*6c8f7fc3SBen Gras  * thereof, and that both notices appear in supporting documentation.
48*6c8f7fc3SBen Gras  *
49*6c8f7fc3SBen Gras  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
50*6c8f7fc3SBen Gras  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
51*6c8f7fc3SBen Gras  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
52*6c8f7fc3SBen Gras  *
53*6c8f7fc3SBen Gras  * Carnegie Mellon requests users of this software to return to
54*6c8f7fc3SBen Gras  *
55*6c8f7fc3SBen Gras  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
56*6c8f7fc3SBen Gras  *  School of Computer Science
57*6c8f7fc3SBen Gras  *  Carnegie Mellon University
58*6c8f7fc3SBen Gras  *  Pittsburgh PA 15213-3890
59*6c8f7fc3SBen Gras  *
60*6c8f7fc3SBen Gras  * any improvements or extensions that they make and grant Carnegie the
61*6c8f7fc3SBen Gras  * rights to redistribute these changes.
62*6c8f7fc3SBen Gras  */
63*6c8f7fc3SBen Gras 
64*6c8f7fc3SBen Gras #ifndef _UVM_UVM_PDAEMON_H_
65*6c8f7fc3SBen Gras #define _UVM_UVM_PDAEMON_H_
66*6c8f7fc3SBen Gras 
67*6c8f7fc3SBen Gras /*
68*6c8f7fc3SBen Gras  * uvm_pdaemon.h: page daemon hooks
69*6c8f7fc3SBen Gras  */
70*6c8f7fc3SBen Gras 
71*6c8f7fc3SBen Gras #ifdef _KERNEL
72*6c8f7fc3SBen Gras 
73*6c8f7fc3SBen Gras /*
74*6c8f7fc3SBen Gras  * prototypes
75*6c8f7fc3SBen Gras  */
76*6c8f7fc3SBen Gras 
77*6c8f7fc3SBen Gras void uvm_wait(const char *);
78*6c8f7fc3SBen Gras bool uvm_reclaimable(void);
79*6c8f7fc3SBen Gras 
80*6c8f7fc3SBen Gras kmutex_t *uvmpd_trylockowner(struct vm_page *);
81*6c8f7fc3SBen Gras #ifdef VMSWAP
82*6c8f7fc3SBen Gras bool uvmpd_trydropswap(struct vm_page *);
83*6c8f7fc3SBen Gras #else
84*6c8f7fc3SBen Gras #define uvmpd_trydropswap(_a_) (/*CONSTCOND*/false)
85*6c8f7fc3SBen Gras #endif
86*6c8f7fc3SBen Gras 
87*6c8f7fc3SBen Gras #endif /* _KERNEL */
88*6c8f7fc3SBen Gras 
89*6c8f7fc3SBen Gras #endif /* _UVM_UVM_PDAEMON_H_ */
90