145748Smckusick /* 263379Sbostic * Copyright (c) 1991, 1993 363379Sbostic * The Regents of the University of California. All rights reserved. 445748Smckusick * 545748Smckusick * This code is derived from software contributed to Berkeley by 645748Smckusick * The Mach Operating System project at Carnegie-Mellon University. 745748Smckusick * 848493Smckusick * %sccs.include.redist.c% 945748Smckusick * 10*68164Scgd * @(#)vm_pageout.h 8.3 (Berkeley) 01/09/95 1148493Smckusick * 1248493Smckusick * 1348493Smckusick * Copyright (c) 1987, 1990 Carnegie-Mellon University. 1448493Smckusick * All rights reserved. 1548493Smckusick * 1648493Smckusick * Author: Avadis Tevanian, Jr. 1748493Smckusick * 1848493Smckusick * Permission to use, copy, modify and distribute this software and 1948493Smckusick * its documentation is hereby granted, provided that both the copyright 2048493Smckusick * notice and this permission notice appear in all copies of the 2148493Smckusick * software, derivative works or modified versions, and any portions 2248493Smckusick * thereof, and that both notices appear in supporting documentation. 2348493Smckusick * 2448493Smckusick * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 2548493Smckusick * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 2648493Smckusick * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 2748493Smckusick * 2848493Smckusick * Carnegie Mellon requests users of this software to return to 2948493Smckusick * 3048493Smckusick * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 3148493Smckusick * School of Computer Science 3248493Smckusick * Carnegie Mellon University 3348493Smckusick * Pittsburgh PA 15213-3890 3448493Smckusick * 3548493Smckusick * any improvements or extensions that they make and grant Carnegie the 3648493Smckusick * rights to redistribute these changes. 3745748Smckusick */ 3845748Smckusick 3945748Smckusick /* 4045748Smckusick * Header file for pageout daemon. 4145748Smckusick */ 4245748Smckusick 4345748Smckusick /* 4445748Smckusick * Exported data structures. 4545748Smckusick */ 4645748Smckusick 4745748Smckusick extern int vm_pages_needed; /* should be some "event" structure */ 4845748Smckusick simple_lock_data_t vm_pages_needed_lock; 4945748Smckusick 5045748Smckusick 5145748Smckusick /* 5245748Smckusick * Exported routines. 5345748Smckusick */ 5445748Smckusick 5545748Smckusick /* 5645748Smckusick * Signal pageout-daemon and wait for it. 5745748Smckusick */ 5845748Smckusick 5945748Smckusick #define VM_WAIT { \ 6045748Smckusick simple_lock(&vm_pages_needed_lock); \ 61*68164Scgd thread_wakeup(&vm_pages_needed); \ 62*68164Scgd thread_sleep(&cnt.v_free_count, \ 6345748Smckusick &vm_pages_needed_lock, FALSE); \ 6445748Smckusick } 6553336Sbostic #ifdef KERNEL 6653336Sbostic void vm_pageout __P((void)); 6753336Sbostic void vm_pageout_scan __P((void)); 6865691Shibler void vm_pageout_page __P((vm_page_t, vm_object_t)); 6965691Shibler void vm_pageout_cluster __P((vm_page_t, vm_object_t)); 7053336Sbostic #endif 71