X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fhmap.h;h=ed2d78d34daf8adf286975c52fdceb6c6f72c5dd;hb=0f49dd6925beadb7e86fda6646285c068ada7303;hp=f6d2827406845ab83ac39c770bc4b877a1935ac9;hpb=772ec52b896380f23b587bea4a5bf18edd22449d;p=openvswitch diff --git a/lib/hmap.h b/lib/hmap.h index f6d28274..ed2d78d3 100644 --- a/lib/hmap.h +++ b/lib/hmap.h @@ -89,7 +89,7 @@ static inline void hmap_remove(struct hmap *, struct hmap_node *); void hmap_node_moved(struct hmap *, struct hmap_node *, struct hmap_node *); static inline void hmap_replace(struct hmap *, const struct hmap_node *old, - struct hmap_node *new); + struct hmap_node *new_node); struct hmap_node *hmap_random_node(const struct hmap *); @@ -157,6 +157,9 @@ static inline struct hmap_node *hmap_first(const struct hmap *); static inline struct hmap_node *hmap_next(const struct hmap *, const struct hmap_node *); +struct hmap_node *hmap_at_position(const struct hmap *, + uint32_t *bucket, uint32_t *offset); + /* Returns the number of nodes currently in 'hmap'. */ static inline size_t hmap_count(const struct hmap *hmap)