Commit | Line | Data |
---|---|---|
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 | * |
de102328 | 10 | * @(#)vm_pageout.h 7.4 (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 | ||
47 | extern int vm_pages_needed; /* should be some "event" structure */ | |
48 | simple_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); \ | |
de102328 | 62 | thread_sleep((int)&vm_stat.free_count, \ |
175f072e KM |
63 | &vm_pages_needed_lock, FALSE); \ |
64 | } |