X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=action.cc;fp=action.cc;h=85a2a766b3583eabb2504bdc5537348520a840b9;hp=d65695446486e58a929196335660d8c3172cb94d;hb=df55261fc251d7b6f15086393911530af340eaf4;hpb=1371ca80e0012e533ad450f955cb95d3d9dcc862 diff --git a/action.cc b/action.cc index d6569544..85a2a766 100644 --- a/action.cc +++ b/action.cc @@ -41,8 +41,10 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, trace_ref(NULL), thrdmap_ref(NULL), action_ref(NULL), + func_act_ref(NULL), value(value), type(type), + original_type(ATOMIC_NOP), order(order), original_order(order), seq_number(ACTION_INITIAL_CLOCK) @@ -77,6 +79,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, uint64_t value, action_ref(NULL), value(value), type(type), + original_type(ATOMIC_NOP), order(order), original_order(order), seq_number(ACTION_INITIAL_CLOCK) @@ -110,6 +113,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, action_ref(NULL), value(value), type(type), + original_type(ATOMIC_NOP), order(order), original_order(order), seq_number(ACTION_INITIAL_CLOCK) @@ -147,6 +151,7 @@ ModelAction::ModelAction(action_type_t type, const char * position, memory_order action_ref(NULL), value(value), type(type), + original_type(ATOMIC_NOP), order(order), original_order(order), seq_number(ACTION_INITIAL_CLOCK) @@ -185,6 +190,7 @@ ModelAction::ModelAction(action_type_t type, const char * position, memory_order action_ref(NULL), value(value), type(type), + original_type(ATOMIC_NOP), order(order), original_order(order), seq_number(ACTION_INITIAL_CLOCK) @@ -772,3 +778,11 @@ cdsc::mutex * ModelAction::get_mutex() const else return NULL; } + +/** @brief Swap type with original type */ +void ModelAction::use_original_type() +{ + action_type_t tmp = type; + type = original_type; + original_type = tmp; +}