Remove spl calls.
This commit is contained in:
parent
04319f388a
commit
8e661e10f6
@ -1090,19 +1090,13 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
|
||||
vm_prot_t max, int cow)
|
||||
{
|
||||
vm_offset_t start;
|
||||
int result, s = 0;
|
||||
int result;
|
||||
|
||||
start = *addr;
|
||||
|
||||
if (map == kmem_map)
|
||||
s = splvm();
|
||||
|
||||
vm_map_lock(map);
|
||||
if (find_space) {
|
||||
if (vm_map_findspace(map, start, length, addr)) {
|
||||
vm_map_unlock(map);
|
||||
if (map == kmem_map)
|
||||
splx(s);
|
||||
return (KERN_NO_SPACE);
|
||||
}
|
||||
start = *addr;
|
||||
@ -1110,10 +1104,6 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
|
||||
result = vm_map_insert(map, object, offset,
|
||||
start, start + length, prot, max, cow);
|
||||
vm_map_unlock(map);
|
||||
|
||||
if (map == kmem_map)
|
||||
splx(s);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
@ -2314,19 +2304,12 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offset_t end)
|
||||
int
|
||||
vm_map_remove(vm_map_t map, vm_offset_t start, vm_offset_t end)
|
||||
{
|
||||
int result, s = 0;
|
||||
|
||||
if (map == kmem_map)
|
||||
s = splvm();
|
||||
int result;
|
||||
|
||||
vm_map_lock(map);
|
||||
VM_MAP_RANGE_CHECK(map, start, end);
|
||||
result = vm_map_delete(map, start, end);
|
||||
vm_map_unlock(map);
|
||||
|
||||
if (map == kmem_map)
|
||||
splx(s);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user