8 #define LOADFACTOR 0.75
11 typedef struct lhashlistnode {
14 struct lhashlistnode *next;
17 typedef struct lhashtable {
18 lhashlistnode_t *table; // points to beginning of hash table
20 unsigned int numelements;
22 pthread_mutex_t locktable;
25 unsigned int lhashCreate(unsigned int size, float loadfactor);// returns 0 for success and 0 for failure
26 unsigned int lhashFunction(unsigned int oid); // returns 0 for success and 0 for failure
27 unsigned int lhashInsert(unsigned int oid, unsigned int mid); // returns 0 for success and 0 for failure
28 unsigned int lhashSearch(unsigned int oid); //returns mid, 0 if not found
29 unsigned int lhashRemove(unsigned int oid); //returns 0 if not success
30 unsigned int lhashResize(unsigned int newsize); // returns 0 for success and 0 for failure