From: Brian Norris Date: Sat, 6 Oct 2012 00:42:03 +0000 (-0700) Subject: threads: add flag for a special type of "model-checker thread" X-Git-Tag: pldi2013~97^2~1^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=0696cb09629cd168f122a2e134246d79c3c8fd2c threads: add flag for a special type of "model-checker thread" Special model-checker thread(s) might be needed when producing special model-checker ModelActions. --- diff --git a/threads.cc b/threads.cc index ca4b28b..e1f74bf 100644 --- a/threads.cc +++ b/threads.cc @@ -126,7 +126,8 @@ Thread::Thread(thrd_t *t, void (*func)(void *), void *a) : user_thread(t), state(THREAD_CREATED), wait_list(), - last_action_val(VALUE_NONE) + last_action_val(VALUE_NONE), + model_thread(false) { int ret; diff --git a/threads.h b/threads.h index a379494..5e8cbef 100644 --- a/threads.h +++ b/threads.h @@ -101,6 +101,8 @@ public: return ret; } + bool is_model_thread() { return model_thread; } + friend void thread_startup(); SNAPSHOTALLOC @@ -131,6 +133,9 @@ private: * @see Thread::get_return_value() */ uint64_t last_action_val; + + /** @brief Is this Thread a special model-checker thread? */ + const bool model_thread; }; Thread * thread_current();