11 typedef struct prehashlistnode {
13 void *val; //this can be cast to another type or used to point to a larger structure
14 struct prehashlistnode *next;
17 typedef struct prehashtable {
18 prehashlistnode_t *table; // points to beginning of hash table
20 unsigned int numelements;
23 pthread_mutexattr_t prefetchmutexattr;
27 /* Prototypes for hash*/
28 unsigned int prehashCreate(unsigned int size, float loadfactor);
29 unsigned int prehashFunction(unsigned int key);
30 unsigned int prehashInsert(unsigned int key, void *val);
31 void *prehashSearch(unsigned int key); //returns val, NULL if not found
32 unsigned int prehashRemove(unsigned int key); //returns -1 if not found
33 unsigned int prehashResize(unsigned int newsize);