X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=include%2Fstruct.h;h=359c4cf5901f377cea6af6fe77adbc4ec554a6dc;hp=3bb724bc6dae5870ee1fcddadae3aee5a14caedd;hb=f0777b2151019e22458f6f166a8f3c569c32a505;hpb=9b3e566281f7e2ac0683205042796958bfd8939f diff --git a/include/struct.h b/include/struct.h index 3bb724b..359c4cf 100644 --- a/include/struct.h +++ b/include/struct.h @@ -9,16 +9,14 @@ typedef struct ht hashtable_t; hashtable_t *ht_alloc (void); -void ht_free (hashtable_t *ht); - uint64_t ht_compare_and_set (hashtable_t *ht, const char *key, uint32_t key_len, uint64_t expected_val, uint64_t val); uint64_t ht_get (hashtable_t *ht, const char *key, uint32_t len); uint64_t ht_remove (hashtable_t *ht, const char *key, uint32_t len); uint64_t ht_count (hashtable_t *ht); +void ht_free (hashtable_t *ht); typedef struct ll list_t; -list_t * ll_alloc (void); - +list_t * ll_alloc (void); uint64_t ll_lookup (list_t *ll, const void *key_data, uint32_t key_len); uint64_t ll_cas (list_t *ll, const void *key_data, uint32_t key_len, uint64_t expected_val, uint64_t new_val); uint64_t ll_remove (list_t *ll, const void *key_data, uint32_t key_len); @@ -26,7 +24,6 @@ void ll_print (list_t *ll); typedef struct sl skiplist_t; skiplist_t * sl_alloc (void); - uint64_t sl_lookup (skiplist_t *sl, const void *key_data, uint32_t key_len); uint64_t sl_add (skiplist_t *sl, const void *key_data, uint32_t key_len, uint64_t value); uint64_t sl_remove (skiplist_t *sl, const void *key_data, uint32_t key_len);