changes
[model-checker.git] / threads.h
index 25b1d6466a4abbb37f0aa633c4a9028cf1459955..248d948fe98c87863741d4ed94343ee22d9cef5e 100644 (file)
--- a/threads.h
+++ b/threads.h
@@ -22,12 +22,13 @@ typedef enum thread_state {
        THREAD_CREATED,
        /** Thread is running */
        THREAD_RUNNING,
+       /** Thread is not currently running but is ready to run */
+       THREAD_READY,
        /**
-        * Thread has yielded to the model-checker but is ready to run. Used
-        * during an action that caused a context switch to the model-checking
-        * context.
+        * Thread is waiting on another action (e.g., thread completion, lock
+        * release, etc.)
         */
-       THREAD_READY,
+       THREAD_BLOCKED,
        /** Thread has completed its execution */
        THREAD_COMPLETED
 } thread_state;
@@ -71,6 +72,9 @@ public:
        /** @return True if this thread is finished executing */
        bool is_complete() { return state == THREAD_COMPLETED; }
 
+       /** @return True if this thread is blocked */
+       bool is_blocked() { return state == THREAD_BLOCKED; }
+
        /** @return True if no threads are waiting on this Thread */
        bool wait_list_empty() { return wait_list.empty(); }