Lines Matching full:it
135 static void sys_hashmap_sc_iter_next(struct sys_hashmap_iterator *it) in sys_hashmap_sc_iter_next() argument
140 const struct sys_hashmap *map = it->map; in sys_hashmap_sc_iter_next()
143 __ASSERT(it->size == map->data->size, "Concurrent modification!"); in sys_hashmap_sc_iter_next()
144 __ASSERT(sys_hashmap_iterator_has_next(it), "Attempt to access beyond current bound!"); in sys_hashmap_sc_iter_next()
146 if (it->pos == 0) { in sys_hashmap_sc_iter_next()
148 it->state = buckets; in sys_hashmap_sc_iter_next()
152 for (bucket = it->state; bucket < &buckets[map->data->n_buckets]; ++bucket) { in sys_hashmap_sc_iter_next()
155 if (entry->key == it->key) { in sys_hashmap_sc_iter_next()
164 it->state = bucket; in sys_hashmap_sc_iter_next()
165 it->key = entry->key; in sys_hashmap_sc_iter_next()
166 it->value = entry->value; in sys_hashmap_sc_iter_next()
167 ++it->pos; in sys_hashmap_sc_iter_next()
180 static void sys_hashmap_sc_iter(const struct sys_hashmap *map, struct sys_hashmap_iterator *it) in sys_hashmap_sc_iter() argument
182 it->map = map; in sys_hashmap_sc_iter()
183 it->next = sys_hashmap_sc_iter_next; in sys_hashmap_sc_iter()
184 it->state = map->data->buckets; in sys_hashmap_sc_iter()
185 it->key = 0; in sys_hashmap_sc_iter()
186 it->value = 0; in sys_hashmap_sc_iter()
187 it->pos = 0; in sys_hashmap_sc_iter()
188 *((size_t *)&it->size) = map->data->size; in sys_hashmap_sc_iter()