Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_map.c
Show First 20 Lines • Show All 2,463 Lines • ▼ Show 20 Lines | for (current = entry; current->start < end; | ||||
if (current->eflags & MAP_ENTRY_IS_SUB_MAP) { | if (current->eflags & MAP_ENTRY_IS_SUB_MAP) { | ||||
vm_map_unlock(map); | vm_map_unlock(map); | ||||
return (KERN_INVALID_ARGUMENT); | return (KERN_INVALID_ARGUMENT); | ||||
} | } | ||||
if ((new_prot & current->max_protection) != new_prot) { | if ((new_prot & current->max_protection) != new_prot) { | ||||
vm_map_unlock(map); | vm_map_unlock(map); | ||||
return (KERN_PROTECTION_FAILURE); | return (KERN_PROTECTION_FAILURE); | ||||
} | } | ||||
if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0) | if ((current->eflags & MAP_ENTRY_IN_TRANSITION) != 0) | ||||
in_tran = entry; | in_tran = current; | ||||
} | } | ||||
/* | /* | ||||
* Postpone the operation until all in transition map entries | * Postpone the operation until all in-transition map entries have | ||||
* are stabilized. In-transition entry might already have its | * stabilized. An in-transition entry might already have its pages | ||||
* pages wired and wired_count incremented, but | * wired and wired_count incremented, but not yet have its | ||||
alc: " ... but not yet have its MAP_ENTRY_USER_WIRED flag set and visible ... | |||||
* MAP_ENTRY_USER_WIRED flag not yet set, and visible to other | * MAP_ENTRY_USER_WIRED flag set. In which case, we would fail to call | ||||
* threads because the map lock is dropped. In this case we | * vm_fault_copy_entry() in the final loop below. | ||||
Not Done Inline ActionsI think that the "and" clause can simply be deleted. In other worlds, we can simply say, "... flag set. In which case, we would fail to ..." alc: I think that the "and" clause can simply be deleted. In other worlds, we can simply say, "... | |||||
* would miss our call to vm_fault_copy_entry(). | |||||
*/ | */ | ||||
if (in_tran != NULL) { | if (in_tran != NULL) { | ||||
in_tran->eflags |= MAP_ENTRY_NEEDS_WAKEUP; | in_tran->eflags |= MAP_ENTRY_NEEDS_WAKEUP; | ||||
vm_map_unlock_and_wait(map, 0); | vm_map_unlock_and_wait(map, 0); | ||||
goto again; | goto again; | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 2,485 Lines • Show Last 20 Lines |
" ... but not yet have its MAP_ENTRY_USER_WIRED flag set and visible ...