Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_object.c
Show First 20 Lines • Show All 2,375 Lines • ▼ Show 20 Lines | _vm_object_in_map(vm_map_t map, vm_object_t object, vm_map_entry_t entry) | ||||
vm_map_entry_t tmpe; | vm_map_entry_t tmpe; | ||||
vm_object_t obj; | vm_object_t obj; | ||||
int entcount; | int entcount; | ||||
if (map == 0) | if (map == 0) | ||||
return 0; | return 0; | ||||
if (entry == 0) { | if (entry == 0) { | ||||
tmpe = map->header.next; | |||||
entcount = map->nentries; | entcount = map->nentries; | ||||
while (entcount-- && (tmpe != &map->header)) { | VME_FOREACH(tmpe, map) { | ||||
if (entcount-- == 0) | |||||
break; | |||||
markj: What's the purpose of the counter? | |||||
dougmAuthorUnsubmitted Done Inline Actionsr6129 | dg | 1995-02-02 03:09:15 -0600 (Thu, 02 Feb 1995) | 48 lines swap_pager.c: I'll remove the counter, if that's okay. dougm: r6129 | dg | 1995-02-02 03:09:15 -0600 (Thu, 02 Feb 1995) | 48 lines
swap_pager.c:
Fixed long… | |||||
markjUnsubmitted Done Inline ActionsLooks like it should be fine to remove. markj: Looks like it should be fine to remove. | |||||
if (_vm_object_in_map(map, object, tmpe)) { | if (_vm_object_in_map(map, object, tmpe)) { | ||||
return 1; | return 1; | ||||
} | } | ||||
tmpe = tmpe->next; | |||||
} | } | ||||
} else if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) { | } else if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) { | ||||
tmpm = entry->object.sub_map; | tmpm = entry->object.sub_map; | ||||
tmpe = tmpm->header.next; | |||||
entcount = tmpm->nentries; | entcount = tmpm->nentries; | ||||
while (entcount-- && tmpe != &tmpm->header) { | VME_FOREACH(tmpe, tmpm) { | ||||
if (entcount-- == 0) | |||||
break; | |||||
if (_vm_object_in_map(tmpm, object, tmpe)) { | if (_vm_object_in_map(tmpm, object, tmpe)) { | ||||
return 1; | return 1; | ||||
} | } | ||||
tmpe = tmpe->next; | |||||
} | } | ||||
} else if ((obj = entry->object.vm_object) != NULL) { | } else if ((obj = entry->object.vm_object) != NULL) { | ||||
for (; obj; obj = obj->backing_object) | for (; obj; obj = obj->backing_object) | ||||
if (obj == object) { | if (obj == object) { | ||||
return 1; | return 1; | ||||
} | } | ||||
} | } | ||||
return 0; | return 0; | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |
What's the purpose of the counter?