10 #define LOADFACTOR 0.5
13 typedef struct lhashlistnode {
16 struct lhashlistnode *next;
19 typedef struct lhashtable {
20 lhashlistnode_t *table; // points to beginning of hash table
22 unsigned int numelements;
24 pthread_mutex_t locktable;
27 //returns 0 for success and 1 for failure
28 unsigned int lhashCreate(unsigned int size, float loadfactor);
29 //returns 0 for success and 1 for failure
30 unsigned int lhashInsert(unsigned int oid, unsigned int mid);
31 //returns mid, 0 if not found
32 unsigned int lhashSearch(unsigned int oid);
33 //returns 0 for success and 1 for failure
34 unsigned int lhashRemove(unsigned int oid);
37 unsigned int lhashResize(unsigned int newsize);
38 unsigned int lhashFunction(unsigned int oid);