lib/cmap: Add more hmap-like functionality.
authorJarno Rajahalme <jrajahalme@nicira.com>
Wed, 28 May 2014 23:56:29 +0000 (16:56 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Wed, 28 May 2014 23:56:29 +0000 (16:56 -0700)
commit9d933fc776405598dba0d0a7e1d30aa955f2c704
tree6880f1a755a5292b88de76be3c203d9718dcdf1b
parente10022d2ac4045a739788670ef26fe48b75ac8af
lib/cmap: Add more hmap-like functionality.

Add cmap_replace() and cmap_first(), as well as CMAP_FOR_EACH_SAFE and
CMAP_FOR_EACH_CONTINUE to make porting existing hmap using code a bit
easier.

CMAP_FOR_EACH_SAFE is useful in RCU postponed destructors, when it is
known that additional postponing is not needed.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/cmap.c
lib/cmap.h
tests/test-cmap.c