886c7871038eb6ab29469b896cc8fdde82f47513
[IRC.git] / Robust / src / Runtime / DSTM / interface / dht.h
1 #ifndef _DHT_H
2 #define _DHT_H
3
4 #define DHT_NO_KEY_LIMIT 0xFFFFFFFF
5
6 //called by host which joins (or starts) the system
7 void dhtInit(unsigned int maxKeyCapaciy);
8 //exit system, cleanup
9 void dhtExit();
10
11 //called by whoever performs the creation, move, deletion
12
13 //returns 0 if successful, -1 if an error occurred
14 int dhtInsert(unsigned int key, unsigned int val);
15 //returns 0 if successful, -1 if an error occurred
16 int dhtRemove(unsigned int key);
17 //returns 0 if successful and copies val into *val, 1 if key not found, -1 if an error occurred
18 int dhtSearch(unsigned int key, unsigned int *val);
19
20 #endif
21