#include <model-assert.h>
#endif
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
using namespace std;
/**
*id2 = (id_tag_t*) ptr2;
if (id1 == NULL || id2 == NULL)
return false;
- return *id1 == *id2;
+ return (*id1).tag == (*id2).tag;
}
@DefineFunc:
ReplaceIfMatch(COND_ReplaceIfMatchSucc)
}
@Happens_before:
- Write_interface -> Read_interface
+ //Write_interface -> Read_interface
+ Put->Get
+ Put->Put
@End
*/
// Should initialize the CHM for the construction of the table
// For other CHM in kvs_data, they should be initialzed in resize()
// because the size is determined dynamically
+ /**
+ @Begin
+ @Entry_point
+ @End
+ */
+
kvs_data *kvs = new kvs_data(init_size);
void *chm = (void*) new CHM(0);
kvs->_data[0].store(chm, memory_order_relaxed);
}
/**
- @Begin
+// @Begin
@Interface: PutIfAbsent
@Commit_point_set:
Write_Success_Point | PutIfAbsent_Fail_Point
}
/**
- @Begin
+// @Begin
@Interface: RemoveAny
@Commit_point_set: Write_Success_Point
@ID: getKeyTag(key)
}
/**
- @Begin
+// @Begin
@Interface: RemoveIfMatch
@Commit_point_set:
Write_Success_Point | RemoveIfMatch_Fail_Point
}
/**
- @Begin
+// @Begin
@Interface: ReplaceAny
@Commit_point_set:
Write_Success_Point
}
/**
- @Begin
+// @Begin
@Interface: ReplaceIfMatch
@Commit_point_set:
Write_Success_Point | ReplaceIfMatch_Fail_Point