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

o Revert a part of revision 1.66, contrary to what that commit message says,

deinlining vm_map_entry_behavior() and vm_map_entry_set_behavior()
   actually increases the kernel's size.
 o Make vm_map_entry_set_behavior() static and add a comment describing
   its purpose.
 o Remove an unnecessary initialization statement from vm_map_entry_splay().
This commit is contained in:
Alan Cox 2002-06-01 16:59:30 +00:00
parent bc89a11710
commit 794316a866
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97710
2 changed files with 21 additions and 17 deletions

View File

@ -356,19 +356,6 @@ vmspace_swap_count(struct vmspace *vmspace)
return (count);
}
u_char
vm_map_entry_behavior(struct vm_map_entry *entry)
{
return entry->eflags & MAP_ENTRY_BEHAV_MASK;
}
void
vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior)
{
entry->eflags = (entry->eflags & ~MAP_ENTRY_BEHAV_MASK) |
(behavior & MAP_ENTRY_BEHAV_MASK);
}
void
_vm_map_lock(vm_map_t map, const char *file, int line)
{
@ -527,6 +514,19 @@ vm_map_entry_create(vm_map_t map)
return (new_entry);
}
/*
* vm_map_entry_set_behavior:
*
* Set the expected access behavior, either normal, random, or
* sequential.
*/
static __inline void
vm_map_entry_set_behavior(vm_map_entry_t entry, u_char behavior)
{
entry->eflags = (entry->eflags & ~MAP_ENTRY_BEHAV_MASK) |
(behavior & MAP_ENTRY_BEHAV_MASK);
}
/*
* vm_map_entry_splay:
*
@ -543,7 +543,6 @@ vm_map_entry_splay(vm_offset_t address, vm_map_entry_t root)
if (root == NULL)
return (root);
dummy.left = dummy.right = NULL;
lefttreemax = righttreemin = &dummy;
for (;;) {
if (address < root->start) {

View File

@ -133,6 +133,14 @@ struct vm_map_entry {
#define MAP_ENTRY_NOCOREDUMP 0x0400 /* don't include in a core */
#ifdef _KERNEL
static __inline u_char
vm_map_entry_behavior(vm_map_entry_t entry)
{
return (entry->eflags & MAP_ENTRY_BEHAV_MASK);
}
#endif /* _KERNEL */
/*
* Maps are doubly-linked lists of map entries, kept sorted
* by address. A single hint is provided to start
@ -210,9 +218,6 @@ struct vmspace {
};
#ifdef _KERNEL
u_char vm_map_entry_behavior(struct vm_map_entry *entry);
void vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior);
/*
* Macros: vm_map_lock, etc.
* Function: