X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Robust%2Fsrc%2FRuntime%2FDSTM%2Finterface%2Fllookup.h;fp=Robust%2Fsrc%2FRuntime%2FDSTM%2Finterface%2Fllookup.h;h=0000000000000000000000000000000000000000;hb=cdcf09c40af1419fa42932aae249cb79b69b5daf;hp=3f9f44c74688f164c3ff39eff88a2ccba243e76d;hpb=d10ef53954b37b62a281cc4e79aef7a4be2af98a;p=IRC.git diff --git a/Robust/src/Runtime/DSTM/interface/llookup.h b/Robust/src/Runtime/DSTM/interface/llookup.h deleted file mode 100644 index 3f9f44c7..00000000 --- a/Robust/src/Runtime/DSTM/interface/llookup.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _LLOOKUP_H_ -#define _LLOOKUP_H_ - -#include -#include -#include - -#define SIMPLE_LLOOKUP - -#define LOADFACTOR 0.5 -#define HASH_SIZE 100 - -typedef struct lhashlistnode { - unsigned int oid; - unsigned int mid; - struct lhashlistnode *next; -} lhashlistnode_t; - -typedef struct lhashtable { - lhashlistnode_t *table; // points to beginning of hash table - unsigned int size; - unsigned int numelements; - float loadfactor; - pthread_mutex_t locktable; -} lhashtable_t; - -//returns 0 for success and 1 for failure -unsigned int lhashCreate(unsigned int size, float loadfactor); -//returns 0 for success and 1 for failure -unsigned int lhashInsert(unsigned int oid, unsigned int mid); -//returns mid, 0 if not found -unsigned int lhashSearch(unsigned int oid); -//returns 0 for success and 1 for failure -unsigned int lhashRemove(unsigned int oid); - -//helper functions -unsigned int lhashResize(unsigned int newsize); -unsigned int lhashFunction(unsigned int oid); - -#endif