]> git.saurik.com Git - apple/xnu.git/blame - bsd/vm/vm_pager.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / bsd / vm / vm_pager.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
ff6e181a
A
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
1c79356b 12 *
ff6e181a
A
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
ff6e181a
A
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
1c79356b
A
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24 * Mach Operating System
25 * Copyright (c) 1987 Carnegie-Mellon University
26 * All rights reserved. The CMU software License Agreement specifies
27 * the terms and conditions for use and redistribution.
28 */
29/*
30 * File: vm_pager.h
31 * Author: Avadis Tevanian, Jr., Michael Wayne Young
32 *
33 * Copyright (C) 1986, Avadis Tevanian, Jr., Michael Wayne Young
34 * Copyright (C) 1985, Avadis Tevanian, Jr., Michael Wayne Young
35 *
36 * Pager routine interface definition
37 */
38
39#ifndef _VM_PAGER_
40#define _VM_PAGER_
41
42#include <mach/boolean.h>
43
44struct pager_struct {
45 boolean_t is_device;
46};
47typedef struct pager_struct *vm_pager_t;
48#define vm_pager_null ((vm_pager_t) 0)
49
50#define PAGER_SUCCESS 0 /* page read or written */
51#define PAGER_ABSENT 1 /* pager does not have page */
52#define PAGER_ERROR 2 /* pager unable to read or write page */
53
54#ifdef KERNEL
55typedef int pager_return_t;
56
91447636
A
57extern vm_pager_t vm_pager_allocate(void);
58extern void vm_pager_deallocate(void);
59extern pager_return_t vm_pager_get(void);
60extern pager_return_t vm_pager_put(void);
61extern boolean_t vm_pager_has_page(void);
1c79356b
A
62#endif /* KERNEL */
63
64#endif /* _VM_PAGER_ */