id_tag_t *tag;
@InitVar:
__deque = new_spec_list();
+ model_print("init_list\n");
tag = new_id_tag(); // Beginning of available id
@Cleanup:
- if (__deque)
- free_spec_list(__deque);
+ if (__deque) {
+ //free_spec_list(__deque);
+ model_print("free_list\n");
+ }
if (tag)
- free_id_tag();
+ free_id_tag(tag);
@DefineFunc:
tag_elem_t* new_tag_elem(call_id_t id, int data) {
tag_elem_t *e = (tag_elem_t*) CMODEL_MALLOC(sizeof(tag_elem_t));
map = new_spec_table_default(equals_key);
id_map = new_spec_table_default(equals_id);
tag = new_id_tag();
-
+ //@Cleanup:
+ // model_print("cleaning up\n");
@DefineFunc:
bool equals_key(void *ptr1, void *ptr2) {
TypeK *key1 = (TypeK*) ptr1,
// File[][] sources = { srcLinuxRWLocks, srcMSQueue, srcRCU,
// srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
- File[][] sources = {srcMSQueue };
+ File[][] sources = {srcMSQueue,srcHashtable, srcDeque };
// Compile all the benchmarks
for (int i = 0; i < sources.length; i++) {
CodeGenerator gen = new CodeGenerator(sources[i]);
String structName = "anno_init", anno = "init";
newCode.add("\t" + STRUCT_NEW_DECLARE_DEFINE(ANNO_INIT, structName));
newCode.add("\t"
- + ASSIGN_TO_PTR(structName, "init_func", "__SPEC_INIT__"));
+ + ASSIGN_TO_PTR(structName, "init_func", "(void*) __SPEC_INIT__"));
newCode.add("\t"
- + ASSIGN_TO_PTR(structName, "cleanup_func", "__SPEC_CLEANUP__"));
+ + ASSIGN_TO_PTR(structName, "cleanup_func", "(void*) __SPEC_CLEANUP__"));
newCode.add("\t"
+ ASSIGN_TO_PTR(structName, "func_table", "func_ptr_table"));
newCode.add("\t"