aboutsummaryrefslogtreecommitdiffstats
path: root/src/fixedmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fixedmap.h')
-rw-r--r--src/fixedmap.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/fixedmap.h b/src/fixedmap.h
index d56a9b7..8398177 100644
--- a/src/fixedmap.h
+++ b/src/fixedmap.h
@@ -18,7 +18,6 @@
#define __FIXEDMAP_H__
#include <sys/types.h>
-#include <sys/refcnt.h>
#define FM_FOREACH(item, fm) \
for (item = (fm)->map; item < (fm)->map + (fm)->size; item++)
@@ -29,23 +28,20 @@
struct fixed_map {
size_t size;
- struct rwlock lock;
struct map_item {
enum {
FM_ITEM_EMPTY = 0,
FM_ITEM_FILLED,
} state;
uint32_t key;
- struct refcnt cnt;
void *value;
} *map;
};
-void fm_init(struct fixed_map *);
-void fm_destroy(struct fixed_map *);
-uint32_t fm_insert(struct fixed_map *, void *);
-void *fm_ref(struct fixed_map *, uint32_t);
-void fm_put(struct fixed_map *, uint32_t);
-void fm_remove(struct fixed_map *, uint32_t);
+void fm_init(struct fixed_map *);
+void fm_destroy(struct fixed_map *);
+uint32_t fm_insert(struct fixed_map *, void *);
+void *fm_lookup(struct fixed_map *, uint32_t);
+void fm_remove(struct fixed_map *, uint32_t);
#endif /* __FIXEDMAP_H__ */