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 | * | |
13 | * @(#)vm_pageout.h 7.1 (Berkeley) %G% | |
14 | */ | |
15 | ||
16 | /* | |
17 | * Header file for pageout daemon. | |
18 | */ | |
19 | ||
20 | #include "lock.h" | |
21 | ||
22 | /* | |
23 | * Exported data structures. | |
24 | */ | |
25 | ||
26 | extern int vm_pages_needed; /* should be some "event" structure */ | |
27 | simple_lock_data_t vm_pages_needed_lock; | |
28 | ||
29 | ||
30 | /* | |
31 | * Exported routines. | |
32 | */ | |
33 | ||
34 | /* | |
35 | * Signal pageout-daemon and wait for it. | |
36 | */ | |
37 | ||
38 | #define VM_WAIT { \ | |
39 | simple_lock(&vm_pages_needed_lock); \ | |
40 | thread_wakeup((int)&vm_pages_needed); \ | |
41 | thread_sleep((int)&vm_page_free_count, \ | |
42 | &vm_pages_needed_lock, FALSE); \ | |
43 | } |