uvm_pdaemon.h revision 1.18
11.18Sad/* $NetBSD: uvm_pdaemon.h,v 1.18 2019/12/30 18:08:38 ad Exp $ */ 21.1Smrg 31.9Schs/* 41.1Smrg * Copyright (c) 1997 Charles D. Cranor and Washington University. 51.9Schs * Copyright (c) 1991, 1993, The Regents of the University of California. 61.1Smrg * 71.1Smrg * All rights reserved. 81.1Smrg * 91.1Smrg * This code is derived from software contributed to Berkeley by 101.1Smrg * The Mach Operating System project at Carnegie-Mellon University. 111.1Smrg * 121.1Smrg * Redistribution and use in source and binary forms, with or without 131.1Smrg * modification, are permitted provided that the following conditions 141.1Smrg * are met: 151.1Smrg * 1. Redistributions of source code must retain the above copyright 161.1Smrg * notice, this list of conditions and the following disclaimer. 171.1Smrg * 2. Redistributions in binary form must reproduce the above copyright 181.1Smrg * notice, this list of conditions and the following disclaimer in the 191.1Smrg * documentation and/or other materials provided with the distribution. 201.17Schuck * 3. Neither the name of the University nor the names of its contributors 211.1Smrg * may be used to endorse or promote products derived from this software 221.1Smrg * without specific prior written permission. 231.1Smrg * 241.1Smrg * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 251.1Smrg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 261.1Smrg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 271.1Smrg * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 281.1Smrg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 291.1Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 301.1Smrg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 311.1Smrg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 321.1Smrg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 331.1Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 341.1Smrg * SUCH DAMAGE. 351.1Smrg * 361.1Smrg * @(#)vm_pageout.h 8.2 (Berkeley) 1/12/94 371.3Smrg * from: Id: uvm_pdaemon.h,v 1.1.2.4 1998/02/02 20:07:20 chuck Exp 381.1Smrg * 391.1Smrg * 401.1Smrg * Copyright (c) 1987, 1990 Carnegie-Mellon University. 411.1Smrg * All rights reserved. 421.9Schs * 431.1Smrg * Permission to use, copy, modify and distribute this software and 441.1Smrg * its documentation is hereby granted, provided that both the copyright 451.1Smrg * notice and this permission notice appear in all copies of the 461.1Smrg * software, derivative works or modified versions, and any portions 471.1Smrg * thereof, and that both notices appear in supporting documentation. 481.9Schs * 491.9Schs * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 501.9Schs * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 511.1Smrg * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 521.9Schs * 531.1Smrg * Carnegie Mellon requests users of this software to return to 541.1Smrg * 551.1Smrg * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 561.1Smrg * School of Computer Science 571.1Smrg * Carnegie Mellon University 581.1Smrg * Pittsburgh PA 15213-3890 591.1Smrg * 601.1Smrg * any improvements or extensions that they make and grant Carnegie the 611.1Smrg * rights to redistribute these changes. 621.1Smrg */ 631.1Smrg 641.4Sperry#ifndef _UVM_UVM_PDAEMON_H_ 651.4Sperry#define _UVM_UVM_PDAEMON_H_ 661.4Sperry 671.1Smrg/* 681.1Smrg * uvm_pdaemon.h: page daemon hooks 691.1Smrg */ 701.1Smrg 711.7Sthorpej#ifdef _KERNEL 721.7Sthorpej 731.1Smrg/* 741.1Smrg * prototypes 751.1Smrg */ 761.1Smrg 771.10Sjunyoungvoid uvm_wait(const char *); 781.14Sthorpejbool uvm_reclaimable(void); 791.7Sthorpej 801.15Sadkmutex_t *uvmpd_trylockowner(struct vm_page *); 811.16Spooka#ifdef VMSWAP 821.18Sadbool uvmpd_dropswap(struct vm_page *); 831.16Spooka#else 841.18Sad#define uvmpd_dropswap(_a_) (/*CONSTCOND*/false) 851.16Spooka#endif 861.13Syamt 871.7Sthorpej#endif /* _KERNEL */ 881.4Sperry 891.4Sperry#endif /* _UVM_UVM_PDAEMON_H_ */ 90