initialize swpa buffers to use proc0 credential (from Leres)
[unix-history] / usr / src / sys / vm / vm_pageout.h
CommitLineData
175f072e 1/*
175f072e
KM
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
0e24ad83 8 * %sccs.include.redist.c%
175f072e 9 *
ffc3bc51 10 * @(#)vm_pageout.h 7.6 (Berkeley) %G%
0e24ad83
KM
11 *
12 *
13 * Copyright (c) 1987, 1990 Carnegie-Mellon University.
14 * All rights reserved.
15 *
16 * Author: Avadis Tevanian, Jr.
17 *
18 * Permission to use, copy, modify and distribute this software and
19 * its documentation is hereby granted, provided that both the copyright
20 * notice and this permission notice appear in all copies of the
21 * software, derivative works or modified versions, and any portions
22 * thereof, and that both notices appear in supporting documentation.
23 *
24 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
25 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
26 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
27 *
28 * Carnegie Mellon requests users of this software to return to
29 *
30 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
31 * School of Computer Science
32 * Carnegie Mellon University
33 * Pittsburgh PA 15213-3890
34 *
35 * any improvements or extensions that they make and grant Carnegie the
36 * rights to redistribute these changes.
175f072e
KM
37 */
38
39/*
40 * Header file for pageout daemon.
41 */
42
175f072e
KM
43/*
44 * Exported data structures.
45 */
46
47extern int vm_pages_needed; /* should be some "event" structure */
48simple_lock_data_t vm_pages_needed_lock;
49
50
51/*
52 * Exported routines.
53 */
54
55/*
56 * Signal pageout-daemon and wait for it.
57 */
58
59#define VM_WAIT { \
60 simple_lock(&vm_pages_needed_lock); \
61 thread_wakeup((int)&vm_pages_needed); \
ebb526a2 62 thread_sleep((int)&cnt.v_free_count, \
175f072e
KM
63 &vm_pages_needed_lock, FALSE); \
64 }
ffc3bc51
KB
65#ifdef KERNEL
66void vm_pageout __P((void));
67void vm_pageout_scan __P((void));
68#endif