From c76c1859f273b58b2fb3b39c8abca2159250905c Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 19 Apr 2013 14:29:29 -0700 Subject: [PATCH] execution: improve yield-blocking structure We should just check the yieldblock parameter within ModelExecution::is_yieldblock(). --- execution.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/execution.cc b/execution.cc index 57ce6fe..e2b690e 100644 --- a/execution.cc +++ b/execution.cc @@ -266,6 +266,9 @@ bool ModelExecution::is_deadlocked() const bool ModelExecution::is_yieldblocked() const { + if (!params->yieldblock) + return false; + for (unsigned int i = 0; i < get_num_threads(); i++) { thread_id_t tid = int_to_id(i); Thread *t = get_thread(tid); @@ -284,7 +287,7 @@ bool ModelExecution::is_yieldblocked() const */ bool ModelExecution::is_complete_execution() const { - if (params->yieldblock && is_yieldblocked()) + if (is_yieldblocked()) return false; for (unsigned int i = 0; i < get_num_threads(); i++) if (is_enabled(int_to_id(i))) @@ -2674,7 +2677,7 @@ void ModelExecution::print_summary() const model_print("Execution %d:", get_execution_number()); if (isfeasibleprefix()) { - if (params->yieldblock && is_yieldblocked()) + if (is_yieldblocked()) model_print(" YIELD BLOCKED"); if (scheduler->all_threads_sleeping()) model_print(" SLEEP-SET REDUNDANT"); -- 2.34.1