]> pd.if.org Git - nbds/blobdiff - include/list.h
more header file refactoring
[nbds] / include / list.h
index 7eeda46aff1e65ffa30accecd26713b9644f40cd..fed7fcda72962865db5db16afcb6943307e55f38 100644 (file)
@@ -1,13 +1,10 @@
 #ifndef LIST_H
 #define LIST_H
 
-#include "datatype.h"
 #include "map.h"
 
 typedef struct ll list_t;
 
-extern map_type_t MAP_TYPE_LIST;
-
 list_t * ll_alloc  (const datatype_t *key_type);
 uint64_t ll_cas    (list_t *ll, void *key, uint64_t expected_val, uint64_t new_val);
 uint64_t ll_lookup (list_t *ll, void *key);
@@ -16,4 +13,9 @@ uint64_t ll_count  (list_t *ll);
 void     ll_print  (list_t *ll);
 void     ll_free   (list_t *ll);
 
+static const map_impl_t ll_map_impl = { 
+    (map_alloc_t)ll_alloc, (map_cas_t)ll_cas, (map_get_t)ll_lookup, (map_remove_t)ll_remove, 
+    (map_count_t)ll_count, (map_print_t)ll_print, (map_free_t)ll_free
+};
+
 #endif//LIST_H