It's useful to have sleep-set information for debugging.
void Node::print() const
{
action->print();
+ model_print(" thread status: ");
+ if (enabled_array) {
+ for (int i = 0; i < num_threads; i++) {
+ char str[20];
+ enabled_type_to_string(enabled_array[i], str);
+ model_print("[%d: %s]", i, str);
+ }
+ model_print("\n");
+ } else
+ model_print("(info not available)\n");
model_print(" backtrack: %s", backtrack_empty() ? "empty" : "non-empty ");
for (int i = 0; i < (int)backtrack.size(); i++)
if (backtrack[i] == true)
* @param e The type to format
* @param str The output character array
*/
-static void enabled_type_to_string(enabled_type_t e, char *str)
+void enabled_type_to_string(enabled_type_t e, char *str)
{
const char *res;
switch (e) {
THREAD_SLEEP_SET
} enabled_type_t;
+void enabled_type_to_string(enabled_type_t e, char *str);
+
/** @brief The Scheduler class performs the mechanics of Thread execution
* scheduling. */
class Scheduler {