From a7df00de36ef87549b654cfbc5c6b098cbba7a5b Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 4 Jun 2019 13:05:00 -0700 Subject: [PATCH 1/1] remove another field --- action.cc | 3 +-- action.h | 4 ---- model.cc | 16 ---------------- model.h | 2 -- 4 files changed, 1 insertion(+), 24 deletions(-) diff --git a/action.cc b/action.cc index 685db105..b9f3d07d 100644 --- a/action.cc +++ b/action.cc @@ -42,8 +42,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, last_fence_release(NULL), node(NULL), seq_number(ACTION_INITIAL_CLOCK), - cv(NULL), - sleep_flag(false) + cv(NULL) { /* References to NULL atomic variables can end up here */ ASSERT(loc || type == ATOMIC_FENCE); diff --git a/action.h b/action.h index 2f599e96..fead25e6 100644 --- a/action.h +++ b/action.h @@ -175,8 +175,6 @@ public: void process_rmw(ModelAction * act); void copy_typeandorder(ModelAction * act); - void set_sleep_flag() { sleep_flag=true; } - bool get_sleep_flag() { return sleep_flag; } unsigned int hash() const; bool equals(const ModelAction *x) const { return this == x; } @@ -245,8 +243,6 @@ private: * vectors for all operations. */ ClockVector *cv; - - bool sleep_flag; }; #endif /* __ACTION_H__ */ diff --git a/model.cc b/model.cc index e9f34da5..9bf97641 100644 --- a/model.cc +++ b/model.cc @@ -103,22 +103,6 @@ Thread * ModelChecker::get_next_thread() return scheduler->select_next_thread(node_stack->get_head()); } -/** - * We need to know what the next actions of all threads in the sleep - * set will be. This method computes them and stores the actions at - * the corresponding thread object's pending action. - */ -void ModelChecker::execute_sleep_set() -{ - for (unsigned int i = 0; i < get_num_threads(); i++) { - thread_id_t tid = int_to_id(i); - Thread *thr = get_thread(tid); - if (scheduler->is_sleep_set(thr) && thr->get_pending()) { - thr->get_pending()->set_sleep_flag(); - } - } -} - /** * @brief Assert a bug in the executing program. * diff --git a/model.h b/model.h index 18fcf0be..9f7804d8 100644 --- a/model.h +++ b/model.h @@ -92,8 +92,6 @@ private: unsigned int get_num_threads() const; - void execute_sleep_set(); - bool next_execution(); bool should_terminate_execution(); -- 2.34.1