vm_map.h (90263) | vm_map.h (92029) |
---|---|
1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 47 unchanged lines hidden (view full) --- 56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 57 * School of Computer Science 58 * Carnegie Mellon University 59 * Pittsburgh PA 15213-3890 60 * 61 * any improvements or extensions that they make and grant Carnegie the 62 * rights to redistribute these changes. 63 * | 1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 47 unchanged lines hidden (view full) --- 56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 57 * School of Computer Science 58 * Carnegie Mellon University 59 * Pittsburgh PA 15213-3890 60 * 61 * any improvements or extensions that they make and grant Carnegie the 62 * rights to redistribute these changes. 63 * |
64 * $FreeBSD: head/sys/vm/vm_map.h 90263 2002-02-05 21:23:05Z alfred $ | 64 * $FreeBSD: head/sys/vm/vm_map.h 92029 2002-03-10 21:52:48Z eivind $ |
65 */ 66 67/* 68 * Virtual memory map module definitions. 69 */ | 65 */ 66 67/* 68 * Virtual memory map module definitions. 69 */ |
70 | |
71#ifndef _VM_MAP_ 72#define _VM_MAP_ 73 74#include <sys/lockmgr.h> 75 76#ifdef MAP_LOCK_DIAGNOSTIC 77#include <sys/systm.h> 78#define vm_map_printf(str, arg) printf(str,arg) --- 10 unchanged lines hidden (view full) --- 89 90typedef u_int vm_eflags_t; 91 92/* 93 * Objects which live in maps may be either VM objects, or 94 * another map (called a "sharing map") which denotes read-write 95 * sharing with other maps. 96 */ | 70#ifndef _VM_MAP_ 71#define _VM_MAP_ 72 73#include <sys/lockmgr.h> 74 75#ifdef MAP_LOCK_DIAGNOSTIC 76#include <sys/systm.h> 77#define vm_map_printf(str, arg) printf(str,arg) --- 10 unchanged lines hidden (view full) --- 88 89typedef u_int vm_eflags_t; 90 91/* 92 * Objects which live in maps may be either VM objects, or 93 * another map (called a "sharing map") which denotes read-write 94 * sharing with other maps. 95 */ |
97 | |
98union vm_map_object { 99 struct vm_object *vm_object; /* object object */ 100 struct vm_map *sub_map; /* belongs to another map */ 101}; 102 103/* 104 * Address map entries consist of start and end addresses, 105 * a VM object (or sharing map) and offset into that object, --- 82 unchanged lines hidden (view full) --- 188 caddr_t vm_daddr; /* user virtual address of data XXX */ 189 caddr_t vm_maxsaddr; /* user VA at max stack growth */ 190 caddr_t vm_minsaddr; /* user VA at max stack growth */ 191#define vm_endcopy vm_freer 192 struct proc *vm_freer; /* vm freed on whose behalf */ 193}; 194 195#ifdef _KERNEL | 96union vm_map_object { 97 struct vm_object *vm_object; /* object object */ 98 struct vm_map *sub_map; /* belongs to another map */ 99}; 100 101/* 102 * Address map entries consist of start and end addresses, 103 * a VM object (or sharing map) and offset into that object, --- 82 unchanged lines hidden (view full) --- 186 caddr_t vm_daddr; /* user virtual address of data XXX */ 187 caddr_t vm_maxsaddr; /* user VA at max stack growth */ 188 caddr_t vm_minsaddr; /* user VA at max stack growth */ 189#define vm_endcopy vm_freer 190 struct proc *vm_freer; /* vm freed on whose behalf */ 191}; 192 193#ifdef _KERNEL |
196 | |
197u_char vm_map_entry_behavior(struct vm_map_entry *entry); 198void vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior); 199 200/* 201 * Macros: vm_map_lock, etc. 202 * Function: 203 * Perform locking on the data portion of a map. Note that 204 * these macros mimic procedure calls returning void. The --- 4 unchanged lines hidden (view full) --- 209 210#if 0 211/* XXX This macro is not called anywhere, and (map)->ref_lock doesn't exist. */ 212#define vm_map_lock_drain_interlock(map) \ 213 do { \ 214 lockmgr(&(map)->lock, LK_DRAIN|LK_INTERLOCK, \ 215 &(map)->ref_lock, curthread); \ 216 (map)->timestamp++; \ | 194u_char vm_map_entry_behavior(struct vm_map_entry *entry); 195void vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior); 196 197/* 198 * Macros: vm_map_lock, etc. 199 * Function: 200 * Perform locking on the data portion of a map. Note that 201 * these macros mimic procedure calls returning void. The --- 4 unchanged lines hidden (view full) --- 206 207#if 0 208/* XXX This macro is not called anywhere, and (map)->ref_lock doesn't exist. */ 209#define vm_map_lock_drain_interlock(map) \ 210 do { \ 211 lockmgr(&(map)->lock, LK_DRAIN|LK_INTERLOCK, \ 212 &(map)->ref_lock, curthread); \ 213 (map)->timestamp++; \ |
217 } while(0) | 214 } while (0) |
218#endif 219 220void vm_map_lock(vm_map_t map); 221void vm_map_unlock(vm_map_t map); 222void vm_map_lock_read(vm_map_t map); 223void vm_map_unlock_read(vm_map_t map); 224int vm_map_lock_upgrade(vm_map_t map); 225void vm_map_lock_downgrade(vm_map_t map); 226void vm_map_set_recursive(vm_map_t map); 227void vm_map_clear_recursive(vm_map_t map); 228vm_offset_t vm_map_min(vm_map_t map); 229vm_offset_t vm_map_max(vm_map_t map); 230struct pmap *vm_map_pmap(vm_map_t map); 231 232struct pmap *vmspace_pmap(struct vmspace *vmspace); 233long vmspace_resident_count(struct vmspace *vmspace); | 215#endif 216 217void vm_map_lock(vm_map_t map); 218void vm_map_unlock(vm_map_t map); 219void vm_map_lock_read(vm_map_t map); 220void vm_map_unlock_read(vm_map_t map); 221int vm_map_lock_upgrade(vm_map_t map); 222void vm_map_lock_downgrade(vm_map_t map); 223void vm_map_set_recursive(vm_map_t map); 224void vm_map_clear_recursive(vm_map_t map); 225vm_offset_t vm_map_min(vm_map_t map); 226vm_offset_t vm_map_max(vm_map_t map); 227struct pmap *vm_map_pmap(vm_map_t map); 228 229struct pmap *vmspace_pmap(struct vmspace *vmspace); 230long vmspace_resident_count(struct vmspace *vmspace); |
234 | |
235#endif /* _KERNEL */ 236 237 238/* XXX: number of kernel maps and entries to statically allocate */ 239#define MAX_KMAP 10 240#define MAX_KMAPENT 128 241#define MAX_MAPENT 128 242 --- 45 unchanged lines hidden (view full) --- 288void vm_map_simplify_entry (vm_map_t, vm_map_entry_t); 289void vm_init2 (void); 290int vm_uiomove (vm_map_t, vm_object_t, off_t, int, vm_offset_t, int *); 291void vm_freeze_copyopts (vm_object_t, vm_pindex_t, vm_pindex_t); 292int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); 293int vm_map_growstack (struct proc *p, vm_offset_t addr); 294int vmspace_swap_count (struct vmspace *vmspace); 295 | 231#endif /* _KERNEL */ 232 233 234/* XXX: number of kernel maps and entries to statically allocate */ 235#define MAX_KMAP 10 236#define MAX_KMAPENT 128 237#define MAX_MAPENT 128 238 --- 45 unchanged lines hidden (view full) --- 284void vm_map_simplify_entry (vm_map_t, vm_map_entry_t); 285void vm_init2 (void); 286int vm_uiomove (vm_map_t, vm_object_t, off_t, int, vm_offset_t, int *); 287void vm_freeze_copyopts (vm_object_t, vm_pindex_t, vm_pindex_t); 288int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); 289int vm_map_growstack (struct proc *p, vm_offset_t addr); 290int vmspace_swap_count (struct vmspace *vmspace); 291 |
296#endif | 292#endif /* _KERNEL */ |
297#endif /* _VM_MAP_ */ | 293#endif /* _VM_MAP_ */ |