struct vm_map *map;
vm_map_t	map;
uvm_map_lookup_entry(map, address, entry)	struct vm_map *map;	vaddr_t	address;	struct vm_map_entry **entry;		/* OUT */{	struct vm_map_entry *cur;	struct vm_map_entry *last;	UVMHIST_FUNC("uvm_map_lookup_entry");	UVMHIST_CALLED(maphist);	UVMHIST_LOG(maphist,"(map=0x%x,addr=0x%x,ent=0x%x)",	    map, address, entry, 0);	/*	 * start looking either from the head of the	 * list, or from the hint.	 */	simple_lock(&map->hint_lock);	cur = map->hint;	simple_unlock(&map->hint_lock);	if (cur == &map->header)		cur = cur->next;	UVMCNT_INCR(uvm_mlk_call);	if (address >= cur->start) {	    	/*		 * go from hint to end of list.		 *		 * but first, make a quick check to see if		 * we are already looking at the entry we		 * want (which is usually the case).		 * note also that we don't need to save the hint		 * here... it is the same hint (unless we are		 * at the header, in which case the hint didn't		 * buy us anything anyway).		 */		last = &map->header;		if ((cur != last) && (cur->end > address)) {			UVMCNT_INCR(uvm_mlk_hint);			*entry = cur;			UVMHIST_LOG(maphist,"<- got it via hint (0x%x)",			    cur, 0, 0, 0);			return (TRUE);		}	} else {	    	/*		 * go from start to hint, *inclusively*		 */		last = cur->next;		cur = map->header.next;	}	/*	 * search linearly	 */	while (cur != last) {		if (cur->end > address) {			if (address >= cur->start) {			    	/*				 * save this lookup for future				 * hints, and return				 */				*entry = cur;				SAVE_HINT(map, map->hint, cur);				UVMHIST_LOG(maphist,"<- search got it (0x%x)",					cur, 0, 0, 0);				return (TRUE);			}			break;		}		cur = cur->next;	}	*entry = cur->prev;	SAVE_HINT(map, map->hint, *entry);	UVMHIST_LOG(maphist,"<- failed!",0,0,0,0);	return (FALSE);}