libcamera: Print Timer identifier

The Timer debug output does not report to which timer a condition refers
to. Fix that by printing the Timer address.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2021-12-11 17:53:40 +01:00
parent f16acb275c
commit 6705596e29
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -214,7 +214,8 @@ int EventDispatcherPoll::poll(std::vector<struct pollfd> *pollfds)
timeout = { 0, 0 };
LOG(Event, Debug)
<< "timeout " << timeout.tv_sec << "."
<< "next timer " << nextTimer << " expires in "
<< timeout.tv_sec << "."
<< std::setfill('0') << std::setw(9)
<< timeout.tv_nsec;
}
+2 -2
View File
@@ -96,7 +96,7 @@ void Timer::start(std::chrono::milliseconds duration)
void Timer::start(std::chrono::steady_clock::time_point deadline)
{
if (Thread::current() != thread()) {
LOG(Timer, Error) << "Timer can't be started from another thread";
LOG(Timer, Error) << "Timer " << this << " << can't be started from another thread";
return;
}
@@ -128,7 +128,7 @@ void Timer::stop()
return;
if (Thread::current() != thread()) {
LOG(Timer, Error) << "Timer can't be stopped from another thread";
LOG(Timer, Error) << "Timer " << this << " can't be stopped from another thread";
return;
}