FreeBSD/Linux Kernel Cross Reference
sys/uvm/uvm_aobj.h
1 /* $OpenBSD: uvm_aobj.h,v 1.19 2022/07/24 11:00:22 mpi Exp $ */
2 /* $NetBSD: uvm_aobj.h,v 1.10 2000/01/11 06:57:49 chs Exp $ */
3
4 /*
5 * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
6 * Washington University.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * from: Id: uvm_aobj.h,v 1.1.2.4 1998/02/06 05:19:28 chs Exp
30 */
31 /*
32 * uvm_aobj.h: anonymous memory uvm_object pager
33 *
34 * author: Chuck Silvers <chuq@chuq.com>
35 * started: Jan-1998
36 *
37 * - design mostly from Chuck Cranor
38 */
39
40 #ifndef _UVM_UVM_AOBJ_H_
41 #define _UVM_UVM_AOBJ_H_
42
43 /*
44 * flags
45 */
46
47 /* flags for uao_create: can only be used one time (at bootup) */
48 #define UAO_FLAG_KERNOBJ 0x1 /* create kernel object */
49 #define UAO_FLAG_KERNSWAP 0x2 /* enable kernel swap */
50 #define UAO_FLAG_CANFAIL 0x4 /* creation can fail */
51
52 /* internal flags */
53 #define UAO_FLAG_NOSWAP 0x8 /* aobj can't swap (kernel obj only!) */
54
55 #ifdef _KERNEL
56
57 /*
58 * prototypes
59 */
60
61 void uao_init(void);
62 int uao_set_swslot(struct uvm_object *, int, int);
63 int uao_dropswap(struct uvm_object *, int);
64 int uao_swap_off(int, int);
65 int uao_shrink(struct uvm_object *, int);
66 int uao_grow(struct uvm_object *, int);
67
68 /*
69 * globals
70 */
71
72 extern const struct uvm_pagerops aobj_pager;
73
74 #endif /* _KERNEL */
75
76 #endif /* _UVM_UVM_AOBJ_H_ */
Cache object: 4395ea363e7f45a1a525cba88c9f9c7b
|