atomic_store_explicit(&q->nodes[node].next, tmp, relaxed);
while (!success) {
+
/**
@Begin
@Commit_point_clear: true
/**
@Begin
@Commit_point_define_check: success
- @Label: Enqueue_Update_Next
+ @Label: EnqueueUpdateNext
@End
*/
}
&tail,
MAKE_POINTER(node, get_count(tail) + 1),
release, relaxed);
- /**
- @Begin
- @Commit_point_define_check: true
- @Label: Enqueue_Update_Tail
- @End
- */
-
}
/**
*/
/**** detected correctness error ****/
head = atomic_load_explicit(&q->head, acquire);
- /**
- @Begin
- @Commit_point_define_check: true
- @Label: Dequeue_Read_Head
- @End
- */
/** A new bug has been found here!!! It should be acquire instead of
* relaxed (it introduces a bug when there's two dequeuers and one
* enqueuer) correctness bug!!
*/
tail = atomic_load_explicit(&q->tail, acquire);
- /**
- @Begin
- @Potential_commit_point_define: true
- @Label: Dequeue_Potential_Read_Tail
- @End
- */
/**** Detected UL/DR (testcase1.c) ****/
next = atomic_load_explicit(&q->nodes[get_ptr(head)].next, acquire);
/**
@Begin
@Potential_commit_point_define: true
- @Label: Dequeue_Potential_Read_Next
+ @Label: DequeueReadNext
@End
*/
if (atomic_load_explicit(&q->head, relaxed) == head) {
&head,
MAKE_POINTER(get_ptr(next), get_count(head) + 1),
release, relaxed);
+ /**
+ @Begin
+ @Commit_point_define_check: success
+ @Label: DequeueUpdateHead
+ @End
+ */
+
/**
@Begin
@Commit_point_define: success
- @Potential_commit_point_label: Dequeue_Potential_Read_Next
- @Label: Dequeue_Read_Next
+ @Potential_commit_point_label: DequeueReadNext
+ @Label: DequeueReadNextVerify
@End
*/
if (!success)
# Only check the happens-before relationship according to the id of the
# commit_point_set. For commit_point_set that has same ID, A -> B means
# B happens after the previous A.
- @Commutativity: Enqueue <-> Dequeue: _Method2.__RET__ == NULL
- @Commutativity: Enqueue <-> Dequeue: _Method1.q != _Method2.q
+ @Commutativity: Enqueue <-> Dequeue: true
+ @Commutativity: Enqueue <-> Enqueue: _Method1.q != _Method2.q
+ @Commutativity: Dequeue <-> Dequeue: _Method1.q != _Method2.q
@End
*/
/**
@Begin
@Interface: Enqueue
- @Commit_point_set: Enqueue_Update_Next | Enqueue_Update_Tail
+ @Commit_point_set: EnqueueUpdateNext
@ID: get_and_inc(tag)
@Action:
# __ID__ is an internal macro that refers to the id of the current
/**
@Begin
@Interface: Dequeue
- @Commit_point_set: Dequeue_Read_Head | Dequeue_Read_Tail | Dequeue_Read_Next
+ @Commit_point_set: DequeueUpdateHead | DequeueReadNextVerify
@ID: get_id(front(__queue))
@Action:
unsigned int _Old_Val = 0;
newCode.add("\t"
+ ASSIGN_TO_PTR("rule", "interface_num_after",
interfaceNumAfter));
+ newCode.add("\t"
+ + ASSIGN_TO_PTR("rule", "rule",
+ "\"" + rule.condition + "\""));
+
newCode.add("\t"
+ ASSIGN_TO_PTR("rule", "condition", conditionFuncName));
String structName = "cp_clear", anno = "annotation_cp_clear";
newCode.add("\t\t"
+ STRUCT_NEW_DECLARE_DEFINE(ANNO_CP_CLEAR, structName));
- // String labelNum = Integer.toString(semantics.commitPointLabel2Num
- // .get(construct.label));
- // String interfaceNum = getCPInterfaceNum(semantics, construct.label);
- // newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_num",
- // labelNum));
- // newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "interface_num",
- // interfaceNum));
+
+ String labelNum = Integer.toString(semantics.commitPointLabel2Num
+ .get(construct.label));
+ String labelName = construct.label;
+ newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_name",
+ "\"" + labelName + "\""));
+ newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_num",
+ labelNum));
+
newCode.add("\t\t" + STRUCT_NEW_DECLARE_DEFINE(SPEC_ANNOTATION, anno));
newCode.add("\t\t"
+ ASSIGN_TO_PTR(anno, "type", SPEC_ANNO_TYPE_CP_CLEAR));