12 typedef struct prehashlistnode {
14 void *val; //this can be cast to another type or used to point to a larger structure
15 struct prehashlistnode *next;
20 typedef struct prehashtable {
21 prehashlistnode_t *table; // points to beginning of hash table
23 unsigned int numelements;
26 pthread_mutexattr_t prefetchmutexattr;
32 /* Prototypes for hash*/
33 unsigned int prehashCreate(unsigned int size, float loadfactor);
34 unsigned int prehashFunction(unsigned int key);
35 unsigned int prehashInsert(unsigned int key, void *val);
36 void *prehashSearch(unsigned int key); //returns val, NULL if not found
37 unsigned int prehashRemove(unsigned int key); //returns -1 if not found
38 unsigned int prehashResize(unsigned int newsize);