From 95ea7b338aa5d48994ba96571811c25e9d44e41a Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Thu, 1 Aug 2013 17:15:45 -0700 Subject: Slightly more useful debugging messages in operationYield. --- src/Task.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Task.cc') diff --git a/src/Task.cc b/src/Task.cc index 77217a5..788424b 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -290,7 +290,10 @@ void Balau::Task::operationYield(Events::BaseEvent * evt, enum OperationYieldTyp "INTERRUPTIBLE", "STACKLESS", }; - Printer::elog(E_TASK, "operation back from yielding; yieldType = %s; okayToEAgain = %s", YieldTypeToString[yieldType], t->m_okayToEAgain ? "true" : "false"); + if (doEAgain) + Printer::elog(E_TASK, "operation couldn't yield; yieldType = %s; okayToEAgain = %s", YieldTypeToString[yieldType], t->m_okayToEAgain ? "true" : "false"); + else + Printer::elog(E_TASK, "operation back from yielding; yieldType = %s; okayToEAgain = %s", YieldTypeToString[yieldType], t->m_okayToEAgain ? "true" : "false"); gotSignal = evt ? evt->gotSignal() : true; } while (((yieldType == SIMPLE) || !t->m_okayToEAgain) && !gotSignal); @@ -298,7 +301,7 @@ void Balau::Task::operationYield(Events::BaseEvent * evt, enum OperationYieldTyp return; if ((yieldType != SIMPLE) && t->m_okayToEAgain && !gotSignal && doEAgain) { - Printer::elog(E_TASK, "operation is throwing an exception."); + Printer::elog(E_TASK, "operation is throwing an EAgain exception with event %p", evt); throw EAgain(evt); } } -- cgit v1.2.3