1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

o Begin documenting the (existing) locking protocol on the vm_map

in the same style as sys/proc.h.
 o Undo the de-inlining of several trivial, MPSAFE methods on the vm_map.
   (Contrary to the commit message for vm_map.h revision 1.66 and vm_map.c
   revision 1.206, de-inlining these methods increased the kernel's size.)
This commit is contained in:
Alan Cox 2002-04-27 22:01:37 +00:00
parent c552e298cb
commit 089b073345
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95589
2 changed files with 26 additions and 25 deletions

View File

@ -437,24 +437,6 @@ vm_map_clear_recursive(vm_map_t map)
mtx_unlock((map)->lock.lk_interlock);
}
vm_offset_t
vm_map_min(vm_map_t map)
{
return (map->min_offset);
}
vm_offset_t
vm_map_max(vm_map_t map)
{
return (map->max_offset);
}
struct pmap *
vm_map_pmap(vm_map_t map)
{
return (map->pmap);
}
struct pmap *
vmspace_pmap(struct vmspace *vmspace)
{
@ -496,7 +478,6 @@ vm_map_create(pmap_t pmap, vm_offset_t min, vm_offset_t max)
static void
_vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max)
{
GIANT_REQUIRED;
map->header.next = map->header.prev = &map->header;
map->system_map = 0;

View File

@ -149,6 +149,9 @@ struct vm_map_entry {
* and free tsleep/waking up 'map' and the underlying lockmgr also
* sleeping and waking up on 'map'. The lockup occurs when the map fills
* up. The 'exec' map, for example.
*
* List of locks
* (c) const until freed
*/
struct vm_map {
struct vm_map_entry header; /* List of entries */
@ -160,11 +163,31 @@ struct vm_map {
vm_map_entry_t hint; /* hint for quick lookups */
unsigned int timestamp; /* Version number */
vm_map_entry_t first_free; /* First free space hint */
struct pmap *pmap; /* Physical map */
#define min_offset header.start
#define max_offset header.end
pmap_t pmap; /* (c) Physical map */
#define min_offset header.start /* (c) */
#define max_offset header.end /* (c) */
};
#ifdef _KERNEL
static __inline vm_offset_t
vm_map_max(vm_map_t map)
{
return (map->max_offset);
}
static __inline vm_offset_t
vm_map_min(vm_map_t map)
{
return (map->min_offset);
}
static __inline pmap_t
vm_map_pmap(vm_map_t map)
{
return (map->pmap);
}
#endif /* _KERNEL */
/*
* Shareable process virtual address space.
* May eventually be merged with vm_map.
@ -222,9 +245,6 @@ int vm_map_lock_upgrade(vm_map_t map);
void vm_map_lock_downgrade(vm_map_t map);
void vm_map_set_recursive(vm_map_t map);
void vm_map_clear_recursive(vm_map_t map);
vm_offset_t vm_map_min(vm_map_t map);
vm_offset_t vm_map_max(vm_map_t map);
struct pmap *vm_map_pmap(vm_map_t map);
struct pmap *vmspace_pmap(struct vmspace *vmspace);
long vmspace_resident_count(struct vmspace *vmspace);