voron

experimental ARM OS
git clone git://git.2f30.org/voron
Log | Files | Refs | README | LICENSE

hash.h (483B)


      1 #ifndef __HASH_H
      2 #define __HASH_H
      3 
      4 #include <inttypes.h>
      5 
      6 struct hops {
      7         long (*hash)(void *data, size_t siz);
      8         int (*cmp)(void *src, void *dst, size_t siz);
      9 };
     10 
     11 struct htable *init_htable(struct hops *ops, size_t siz);
     12 void free_htable(struct htable *ht);
     13 long search_htable(struct htable *ht, void *data, size_t siz);
     14 long insert_htable(struct htable *ht, void *data, size_t siz);
     15 long remove_htable(struct htable *ht, void *data, size_t siz);
     16 
     17 #endif /* __HASH_H */