X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fshash.h;h=5794a20f4d3b0659e3bf7533fff228e734327459;hb=b3080599f6b280c63b9b6f4ca2d3c6006bcd9590;hp=72d8302007462fb74f1d10066e04e77406182b3e;hpb=78299b0a6871a31c8b0cce5ef3f67ab465ab094f;p=openvswitch diff --git a/lib/shash.h b/lib/shash.h index 72d83020..5794a20f 100644 --- a/lib/shash.h +++ b/lib/shash.h @@ -31,6 +31,13 @@ struct shash { #define SHASH_INITIALIZER(SHASH) { HMAP_INITIALIZER(&(SHASH)->map) } +#define SHASH_FOR_EACH(SHASH_NODE, SHASH) \ + HMAP_FOR_EACH (SHASH_NODE, struct shash_node, node, &(SHASH)->map) + +#define SHASH_FOR_EACH_SAFE(SHASH_NODE, NEXT, SHASH) \ + HMAP_FOR_EACH_SAFE (SHASH_NODE, NEXT, struct shash_node, node, \ + &(SHASH)->map) + void shash_init(struct shash *); void shash_destroy(struct shash *); void shash_clear(struct shash *);