+ // ...
+ // Same as the above case
+ }
+ break;
+ default:
+ break;
+}
+
+
+***** Example6: ******
+Commit Point Define Check
+
+
+#include <threads.h>
+#include <cdstrace.h>
+#include <cdsannotate.h>
+#include <spec_private_hashtable.h>
+#include <CDSName.h>
+
+
+thrd_t __tid = thrd_current();
+int interface_num = get(&__sequential.interface, tid);
+/* For all the interface check at this commit point (if there is multiple
+ * checks here) */
+/* Need to compute the relationship between labels before hand */
+switch (interface_num) {
+ case 0:
+ if (COMMIT_POINT3_CONDITION) {
+ if (INTERFACE0_CHECK_CONDITION) {
+ check_passed = true;
+ }
+ /* For all DefineVar of INTERFACE0 (Type id = Expr) (Type must be a
+ * pointer) */
+ /* Unfold all if there are multiple DefineVars */
+ Type res0 = Expr;
+ put(&__sequential.put__Old_Val, tid, (uint64_t) res0);
+ // And more...
+
+ /* Compute id; If not defined, assign the default ID */
+ int id = INTERFACE0_ID_EXPRESSION;
+ put(__sequential.id, tid, id);
+
+ /* Execute actions if there's any */
+ #define _Old_Val res0;
+ INTERFACE0_ACTION; // Unfolded right in place
+ #undef _Old_Val
+ // And more...