vm_map.h (57550) | vm_map.h (66615) |
---|---|
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 57550 2000-02-28 04:10:35Z ps $ | 64 * $FreeBSD: head/sys/vm/vm_map.h 66615 2000-10-04 01:29:17Z jasone $ |
65 */ 66 67/* 68 * Virtual memory map module definitions. 69 */ 70 71#ifndef _VM_MAP_ 72#define _VM_MAP_ --- 125 unchanged lines hidden (view full) --- 198 * Function: 199 * Perform locking on the data portion of a map. Note that 200 * these macros mimic procedure calls returning void. The 201 * semicolon is supplied by the user of these macros, not 202 * by the macros themselves. The macros can safely be used 203 * as unbraced elements in a higher level statement. 204 */ 205 | 65 */ 66 67/* 68 * Virtual memory map module definitions. 69 */ 70 71#ifndef _VM_MAP_ 72#define _VM_MAP_ --- 125 unchanged lines hidden (view full) --- 198 * Function: 199 * Perform locking on the data portion of a map. Note that 200 * these macros mimic procedure calls returning void. The 201 * semicolon is supplied by the user of these macros, not 202 * by the macros themselves. The macros can safely be used 203 * as unbraced elements in a higher level statement. 204 */ 205 |
206/* XXX This macro is not called anywhere, and (map)->ref_lock doesn't exist. */ |
|
206#define vm_map_lock_drain_interlock(map) \ 207 do { \ 208 lockmgr(&(map)->lock, LK_DRAIN|LK_INTERLOCK, \ 209 &(map)->ref_lock, curproc); \ 210 (map)->timestamp++; \ 211 } while(0) 212 213#ifdef DIAGNOSTIC --- 71 unchanged lines hidden (view full) --- 285 } while (0) 286#else 287#define vm_map_lock_downgrade(map) \ 288 lockmgr(&(map)->lock, LK_DOWNGRADE, (void *)0, curproc) 289#endif 290 291#define vm_map_set_recursive(map) \ 292 do { \ | 207#define vm_map_lock_drain_interlock(map) \ 208 do { \ 209 lockmgr(&(map)->lock, LK_DRAIN|LK_INTERLOCK, \ 210 &(map)->ref_lock, curproc); \ 211 (map)->timestamp++; \ 212 } while(0) 213 214#ifdef DIAGNOSTIC --- 71 unchanged lines hidden (view full) --- 286 } while (0) 287#else 288#define vm_map_lock_downgrade(map) \ 289 lockmgr(&(map)->lock, LK_DOWNGRADE, (void *)0, curproc) 290#endif 291 292#define vm_map_set_recursive(map) \ 293 do { \ |
293 simple_lock(&(map)->lock.lk_interlock); \ | 294 mtx_enter(&(map)->lock.lk_interlock, MTX_DEF); \ |
294 (map)->lock.lk_flags |= LK_CANRECURSE; \ | 295 (map)->lock.lk_flags |= LK_CANRECURSE; \ |
295 simple_unlock(&(map)->lock.lk_interlock); \ | 296 mtx_exit(&(map)->lock.lk_interlock, MTX_DEF); \ |
296 } while(0) 297#define vm_map_clear_recursive(map) \ 298 do { \ | 297 } while(0) 298#define vm_map_clear_recursive(map) \ 299 do { \ |
299 simple_lock(&(map)->lock.lk_interlock); \ | 300 mtx_enter(&(map)->lock.lk_interlock, MTX_DEF); \ |
300 (map)->lock.lk_flags &= ~LK_CANRECURSE; \ | 301 (map)->lock.lk_flags &= ~LK_CANRECURSE; \ |
301 simple_unlock(&(map)->lock.lk_interlock); \ | 302 mtx_exit(&(map)->lock.lk_interlock, MTX_DEF); \ |
302 } while(0) 303 304/* 305 * Functions implemented as macros 306 */ 307#define vm_map_min(map) ((map)->min_offset) 308#define vm_map_max(map) ((map)->max_offset) 309#define vm_map_pmap(map) ((map)->pmap) --- 40 unchanged lines hidden (view full) --- 350boolean_t vm_map_check_protection __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t)); 351struct pmap; 352vm_map_t vm_map_create __P((struct pmap *, vm_offset_t, vm_offset_t)); 353int vm_map_delete __P((vm_map_t, vm_offset_t, vm_offset_t)); 354int vm_map_find __P((vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, boolean_t, vm_prot_t, vm_prot_t, int)); 355int vm_map_findspace __P((vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *)); 356int vm_map_inherit __P((vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t)); 357void vm_map_init __P((struct vm_map *, vm_offset_t, vm_offset_t)); | 303 } while(0) 304 305/* 306 * Functions implemented as macros 307 */ 308#define vm_map_min(map) ((map)->min_offset) 309#define vm_map_max(map) ((map)->max_offset) 310#define vm_map_pmap(map) ((map)->pmap) --- 40 unchanged lines hidden (view full) --- 351boolean_t vm_map_check_protection __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t)); 352struct pmap; 353vm_map_t vm_map_create __P((struct pmap *, vm_offset_t, vm_offset_t)); 354int vm_map_delete __P((vm_map_t, vm_offset_t, vm_offset_t)); 355int vm_map_find __P((vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, boolean_t, vm_prot_t, vm_prot_t, int)); 356int vm_map_findspace __P((vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *)); 357int vm_map_inherit __P((vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t)); 358void vm_map_init __P((struct vm_map *, vm_offset_t, vm_offset_t)); |
359void vm_map_destroy __P((struct vm_map *)); |
|
358int vm_map_insert __P((vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int)); 359int vm_map_lookup __P((vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, 360 vm_pindex_t *, vm_prot_t *, boolean_t *)); 361void vm_map_lookup_done __P((vm_map_t, vm_map_entry_t)); 362boolean_t vm_map_lookup_entry __P((vm_map_t, vm_offset_t, vm_map_entry_t *)); 363int vm_map_pageable __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t)); 364int vm_map_user_pageable __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t)); 365int vm_map_clean __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t)); --- 14 unchanged lines hidden --- | 360int vm_map_insert __P((vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int)); 361int vm_map_lookup __P((vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, 362 vm_pindex_t *, vm_prot_t *, boolean_t *)); 363void vm_map_lookup_done __P((vm_map_t, vm_map_entry_t)); 364boolean_t vm_map_lookup_entry __P((vm_map_t, vm_offset_t, vm_map_entry_t *)); 365int vm_map_pageable __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t)); 366int vm_map_user_pageable __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t)); 367int vm_map_clean __P((vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t)); --- 14 unchanged lines hidden --- |