Do not report deadlock on relocking a recursive mutex; lock count not implemented yet
[c11tester.git] / action.cc
index df73d2099cc7641be668e03878bfc29f61e190fc..d65695446486e58a929196335660d8c3172cb94d 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -41,11 +41,8 @@ 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),
-       swap_flag(false),
        order(order),
        original_order(order),
        seq_number(ACTION_INITIAL_CLOCK)
@@ -78,11 +75,8 @@ ModelAction::ModelAction(action_type_t type, memory_order order, uint64_t value,
        trace_ref(NULL),
        thrdmap_ref(NULL),
        action_ref(NULL),
-       func_act_ref(NULL),
        value(value),
        type(type),
-       original_type(ATOMIC_NOP),
-       swap_flag(false),
        order(order),
        original_order(order),
        seq_number(ACTION_INITIAL_CLOCK)
@@ -114,11 +108,8 @@ 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),
-       swap_flag(false),
        order(order),
        original_order(order),
        seq_number(ACTION_INITIAL_CLOCK)
@@ -154,11 +145,8 @@ ModelAction::ModelAction(action_type_t type, const char * position, memory_order
        trace_ref(NULL),
        thrdmap_ref(NULL),
        action_ref(NULL),
-       func_act_ref(NULL),
        value(value),
        type(type),
-       original_type(ATOMIC_NOP),
-       swap_flag(false),
        order(order),
        original_order(order),
        seq_number(ACTION_INITIAL_CLOCK)
@@ -195,11 +183,8 @@ ModelAction::ModelAction(action_type_t type, const char * position, memory_order
        trace_ref(NULL),
        thrdmap_ref(NULL),
        action_ref(NULL),
-       func_act_ref(NULL),
        value(value),
        type(type),
-       original_type(ATOMIC_NOP),
-       swap_flag(false),
        order(order),
        original_order(order),
        seq_number(ACTION_INITIAL_CLOCK)
@@ -623,7 +608,7 @@ uint64_t ModelAction::get_reads_from_value() const
  */
 uint64_t ModelAction::get_write_value() const
 {
-       ASSERT(is_write() || is_free());
+       ASSERT(is_write());
        return value;
 }
 
@@ -787,16 +772,3 @@ 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;
-
-       if (swap_flag)
-               swap_flag = false;
-       else
-               swap_flag = true;
-}