Commit | Line | Data |
---|---|---|
175f072e KM |
1 | /* |
2 | * Copyright (c) 1986, Avadis Tevanian, Jr. | |
3 | * Copyright (c) 1987 Carnegie-Mellon University | |
4 | * Copyright (c) 1991 Regents of the University of California. | |
5 | * All rights reserved. | |
6 | * | |
7 | * This code is derived from software contributed to Berkeley by | |
8 | * The Mach Operating System project at Carnegie-Mellon University. | |
9 | * | |
10 | * The CMU software License Agreement specifies the terms and conditions | |
11 | * for use and redistribution. | |
12 | * | |
ffe0d082 | 13 | * @(#)vm_pageout.h 7.2 (Berkeley) %G% |
175f072e KM |
14 | */ |
15 | ||
16 | /* | |
17 | * Header file for pageout daemon. | |
18 | */ | |
19 | ||
175f072e KM |
20 | /* |
21 | * Exported data structures. | |
22 | */ | |
23 | ||
24 | extern int vm_pages_needed; /* should be some "event" structure */ | |
25 | simple_lock_data_t vm_pages_needed_lock; | |
26 | ||
27 | ||
28 | /* | |
29 | * Exported routines. | |
30 | */ | |
31 | ||
32 | /* | |
33 | * Signal pageout-daemon and wait for it. | |
34 | */ | |
35 | ||
36 | #define VM_WAIT { \ | |
37 | simple_lock(&vm_pages_needed_lock); \ | |
38 | thread_wakeup((int)&vm_pages_needed); \ | |
39 | thread_sleep((int)&vm_page_free_count, \ | |
40 | &vm_pages_needed_lock, FALSE); \ | |
41 | } |