From: Brian Norris Date: Fri, 19 Apr 2013 21:32:51 +0000 (-0700) Subject: execution: improve documentation X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=commitdiff_plain;h=13a5122212f76cf215e0d704b7b46ddfc892b26b execution: improve documentation is_yieldblocked() wasn't documented check_action_enabled() had incorrect documentation, since I removed the waiter lists --- diff --git a/execution.cc b/execution.cc index e2b690e..e01181a 100644 --- a/execution.cc +++ b/execution.cc @@ -264,6 +264,14 @@ bool ModelExecution::is_deadlocked() const return blocking_threads; } +/** + * @brief Check if we are yield-blocked + * + * A program can be "yield-blocked" if all threads are ready to execute a + * yield. + * + * @return True if the program is yield-blocked; false otherwise + */ bool ModelExecution::is_yieldblocked() const { if (!params->yieldblock) @@ -1197,9 +1205,10 @@ void ModelExecution::thread_blocking_check_promises(Thread *blocker, Thread *wai /** * @brief Check whether a model action is enabled. * - * Checks whether a lock or join operation would be successful (i.e., is the - * lock already locked, or is the joined thread already complete). If not, put - * the action in a waiter list. + * Checks whether an operation would be successful (i.e., is a lock already + * locked, or is the joined thread already complete). + * + * For yield-blocking, yields are never enabled. * * @param curr is the ModelAction to check whether it is enabled. * @return a bool that indicates whether the action is enabled.