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;
/** @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(); }