Lines Matching refs:neighborhood
244 static struct bucket *dereference_hop(struct bucket *neighborhood, unsigned int hop_offset) in dereference_hop() argument
250 return &neighborhood[hop_offset - 1]; in dereference_hop()
260 static void insert_in_hop_list(struct bucket *neighborhood, struct bucket *new_bucket) in insert_in_hop_list() argument
263 int hop_offset = 1 + (new_bucket - neighborhood); in insert_in_hop_list()
266 int next_hop = neighborhood->first_hop; in insert_in_hop_list()
270 neighborhood->first_hop = hop_offset; in insert_in_hop_list()
276 struct bucket *bucket = dereference_hop(neighborhood, next_hop); in insert_in_hop_list()
528 static bool update_mapping(struct int_map *map, struct bucket *neighborhood, in update_mapping() argument
531 struct bucket *bucket = search_hop_list(map, neighborhood, key, NULL); in update_mapping()
563 struct bucket *neighborhood) in find_or_make_vacancy() argument
566 struct bucket *hole = find_empty_bucket(map, neighborhood, MAX_PROBES); in find_or_make_vacancy()
573 int distance = hole - neighborhood; in find_or_make_vacancy()
613 struct bucket *neighborhood, *bucket; in vdo_int_map_put() local
622 neighborhood = select_bucket(map, key); in vdo_int_map_put()
628 if (update_mapping(map, neighborhood, key, new_value, update, old_value_ptr)) in vdo_int_map_put()
636 while ((bucket = find_or_make_vacancy(map, neighborhood)) == NULL) { in vdo_int_map_put()
653 neighborhood = select_bucket(map, key); in vdo_int_map_put()
659 insert_in_hop_list(neighborhood, bucket); in vdo_int_map_put()