Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148072074
D25282.id73183.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25282.id73183.diff
View Options
Index: sys/vm/vm_map.c
===================================================================
--- sys/vm/vm_map.c
+++ sys/vm/vm_map.c
@@ -2377,21 +2377,14 @@
* the specified address; if necessary,
* it splits the entry into two.
*/
-#define vm_map_clip_start(map, entry, startaddr) \
-{ \
- if (startaddr > entry->start) \
- _vm_map_clip_start(map, entry, startaddr); \
-}
-
-/*
- * This routine is called only when it is known that
- * the entry must be split.
- */
static inline void
-_vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start)
+vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start)
{
vm_map_entry_t new_entry;
+ if (startaddr <= entry->start)
+ return;
+
VM_MAP_ASSERT_LOCKED(map);
KASSERT(entry->end > start && entry->start < start,
("_vm_map_clip_start: invalid clip of entry %p", entry));
@@ -2435,21 +2428,14 @@
* the specified address; if necessary,
* it splits the entry into two.
*/
-#define vm_map_clip_end(map, entry, endaddr) \
-{ \
- if ((endaddr) < (entry->end)) \
- _vm_map_clip_end((map), (entry), (endaddr)); \
-}
-
-/*
- * This routine is called only when it is known that
- * the entry must be split.
- */
static inline void
-_vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end)
+vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end)
{
vm_map_entry_t new_entry;
+ if (endaddr >= entry->end)
+ return;
+
VM_MAP_ASSERT_LOCKED(map);
KASSERT(entry->start < end && entry->end > end,
("_vm_map_clip_end: invalid clip of entry %p", entry));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 16, 1:54 PM (12 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29732526
Default Alt Text
D25282.id73183.diff (1 KB)
Attached To
Mode
D25282: vm: Convert vm_map_clip_end from a macro to a regular inline function
Attached
Detach File
Event Timeline
Log In to Comment