threads: add is_complete() helper function
[model-checker.git] / threads.h
index e7cd792a134c4b5e223b6f9465af4eaf83753b1e..f7efcf967236b4c57ed22440ffa16a49bca1c5be 100644 (file)
--- a/threads.h
+++ b/threads.h
@@ -67,6 +67,9 @@ public:
         */
        uint64_t get_return_value() { return last_action_val; }
 
+       /** @return True if this thread is finished executing */
+       bool is_complete() { return state == THREAD_COMPLETED; }
+
        friend void thread_startup();
 
        SNAPSHOTALLOC