fix tabbing
[c11tester.git] / execution.cc
index c32b628876fc22ccf3a4aba46d2839f182f99965..7b09871e4b5a73c335e04393c77b1667841ba04c 100644 (file)
@@ -64,7 +64,7 @@ ModelExecution::ModelExecution(ModelChecker *m, Scheduler *scheduler, NodeStack
        thrd_last_fence_release(),
        node_stack(node_stack),
        priv(new struct model_snapshot_members ()),
-       mo_graph(new CycleGraph()),
+                        mo_graph(new CycleGraph()),
        fuzzer(new Fuzzer())
 {
        /* Initialize a model-checker thread, for special ModelActions */
@@ -279,8 +279,8 @@ void ModelExecution::process_read(ModelAction *curr, SnapVector<const ModelActio
                        get_thread(curr)->set_return_value(curr->get_return_value());
                        delete priorset;
                        if (canprune && curr->get_type() == ATOMIC_READ) {
-                         int tid = id_to_int(curr->get_tid());
-                         (*obj_thrd_map.get(curr->get_location()))[tid].pop_back();
+                               int tid = id_to_int(curr->get_tid());
+                               (*obj_thrd_map.get(curr->get_location()))[tid].pop_back();
                        }
                        return;
                }
@@ -783,7 +783,7 @@ bool ModelExecution::r_modification_order(ModelAction *curr, const ModelAction *
        int tid = curr->get_tid();
        ModelAction *prev_same_thread = NULL;
        /* Iterate over all threads */
-       for (i = 0;i < thrd_lists->size();i++, tid = (((unsigned int)(tid+1)) == thrd_lists->size()) ? 0: tid + 1) {
+       for (i = 0;i < thrd_lists->size();i++, tid = (((unsigned int)(tid+1)) == thrd_lists->size()) ? 0 : tid + 1) {
                /* Last SC fence in thread tid */
                ModelAction *last_sc_fence_thread_local = NULL;
                if (i != 0)
@@ -796,11 +796,11 @@ bool ModelExecution::r_modification_order(ModelAction *curr, const ModelAction *
 
                //Only need to iterate if either hb has changed for thread in question or SC fence after last operation...
                if (prev_same_thread != NULL &&
-                   (prev_same_thread->get_cv()->getClock(tid) == curr->get_cv()->getClock(tid)) &&
-                   (last_sc_fence_thread_local == NULL || *last_sc_fence_thread_local < *prev_same_thread)) {
-                     continue;
+                               (prev_same_thread->get_cv()->getClock(tid) == curr->get_cv()->getClock(tid)) &&
+                               (last_sc_fence_thread_local == NULL || *last_sc_fence_thread_local < *prev_same_thread)) {
+                       continue;
                }
-               
+
                /* Iterate over actions in thread, starting from most recent */
                action_list_t *list = &(*thrd_lists)[tid];
                action_list_t::reverse_iterator rit;
@@ -850,12 +850,12 @@ bool ModelExecution::r_modification_order(ModelAction *curr, const ModelAction *
                         * before" curr
                         */
                        if (act->happens_before(curr)) {
-                         if (i==0) {
-                           if (last_sc_fence_local == NULL ||
-                               (*last_sc_fence_local < *prev_same_thread)) {
-                             prev_same_thread = act;
-                           }
-                         }
+                               if (i==0) {
+                                       if (last_sc_fence_local == NULL ||
+                                                       (*last_sc_fence_local < *prev_same_thread)) {
+                                               prev_same_thread = act;
+                                       }
+                               }
                                if (act->is_write()) {
                                        if (mo_graph->checkReachable(rf, act))
                                                return false;