|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: * Mach Operating System
27: * Copyright (c) 1987 Carnegie-Mellon University
28: * All rights reserved. The CMU software License Agreement specifies
29: * the terms and conditions for use and redistribution.
30: */
31:
32: subsystem pager 2200;
33:
34: /*
35: * File: kern/pager.defs
36: *
37: * Abstract:
38: * Basic Mach external memory management interface declaration.
39: * [See kern/pager_default.defs for the interface for default pagers.]
40: *
41: * HISTORY
42: * 9-Dec-87 Michael Young (mwyoung) at Carnegie-Mellon University
43: * Split that part of the interface applicable only to default
44: * pagers into a separate interface definition.
45: *
46: * Documented the interface.
47: *
48: * Purged history. Contributors so far: jle, mwyoung, bolosky.
49: *
50: */
51:
52: /*
53: * Basic types
54: */
55:
56: type int = MSG_TYPE_INTEGER_32;
57: type boolean_t = MSG_TYPE_BOOLEAN;
58:
59: type port_t = MSG_TYPE_PORT;
60: type port_all_t = MSG_TYPE_PORT_ALL;
61: type paging_object_t = port_t;
62: type vm_offset_t = int;
63: type vm_size_t = int;
64: type vm_prot_t = int;
65:
66: type pointer_t = ^array [] of (MSG_TYPE_INTEGER_8, 8);
67:
68: import <mach/mach_types.h>;
69:
70: /*
71: * Initialize the specified memory object, providing
72: * a reqeust port on which control calls can be made, and
73: * a name port that identifies this object to callers of
74: * vm_regions.
75: * [No reply expected.]
76: */
77: simpleroutine pager_init(
78: paging_object : paging_object_t;
79: pager_request_port : port_t;
80: pager_name : port_t;
81: page_size : vm_size_t);
82:
83: skip;
84:
85: skip;
86: /* Removed until we know how we'll use it */
87: /*
88: simpleroutine pager_copy(
89: old_paging_object : paging_object_t;
90: offset : vm_offset_t;
91: length : vm_size_t;
92: new_paging_object : port_all_t;
93: new_request_port : port_t;
94: new_name : port_t;
95: new_page_size : vm_size_t); */
96:
97: /*
98: * Request data from this memory object. At least
99: * the specified data should be returned with at
100: * least the specified access permitted.
101: * [Reply should be pager_data_provided.]
102: */
103: simpleroutine pager_data_request(
104: paging_object : paging_object_t;
105: pager_request_port : port_t;
106: offset : vm_offset_t;
107: length : vm_size_t;
108: desired_access : vm_prot_t);
109:
110: /*
111: * Request that the specified portion of this
112: * memory object be unlocked to allow the specified
113: * forms of access; the kernel already has the data.
114: * [Reply should be pager_lock_request.]
115: */
116: simpleroutine pager_data_unlock(
117: paging_object : paging_object_t;
118: pager_request_port : port_t;
119: offset : vm_offset_t;
120: length : vm_size_t;
121: desired_access : vm_prot_t);
122:
123: /*
124: * Write back modifications made to this portion of
125: * the memory object while in memory.
126: * Unless explicitly requested by a pager_lock_request
127: * (clean, but not flush), the kernel will not continue
128: * to use this data.
129: * [Reply should be vm_deallocate to release the data.]
130: */
131: simpleroutine pager_data_write(
132: paging_object : paging_object_t;
133: pager_request_port : port_t;
134: offset : vm_offset_t;
135: data : pointer_t);
136:
137: /*
138: * Indicate that a previous pager_lock_reqeust has been
139: * completed. Note that this call is made on whatever
140: * port is specified in the pager_lock_request; that need
141: * not be the memory object port itself.
142: * [No reply expected.]
143: */
144: simpleroutine pager_lock_completed(
145: paging_object : paging_object_t;
146: pager_request_port : port_t;
147: offset : vm_offset_t;
148: length : vm_size_t);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.