{"id":15136,"url":"https://patchwork.libcamera.org/api/1.1/patches/15136/?format=json","web_url":"https://patchwork.libcamera.org/patch/15136/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211211165714.23067-2-jacopo@jmondi.org>","date":"2021-12-11T16:57:04","name":"[libcamera-devel,v6,01/11] libcamera: Print Timer identifier","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"d59c7761bf93106c6e81fd9540b537d9901fdf97","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15136/mbox/","series":[{"id":2838,"url":"https://patchwork.libcamera.org/api/1.1/series/2838/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2838","date":"2021-12-11T16:57:03","name":"libcamera: Add Fence support","version":6,"mbox":"https://patchwork.libcamera.org/series/2838/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15136/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15136/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 166E5BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 11 Dec 2021 16:56:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B4DF4608A5;\n\tSat, 11 Dec 2021 17:56:28 +0100 (CET)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 92B2160113\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 11 Dec 2021 17:56:25 +0100 (CET)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id F30FB20007;\n\tSat, 11 Dec 2021 16:56:24 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 11 Dec 2021 17:57:04 +0100","Message-Id":"<20211211165714.23067-2-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.33.1","In-Reply-To":"<20211211165714.23067-1-jacopo@jmondi.org>","References":"<20211211165714.23067-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 01/11] libcamera: Print Timer identifier","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The Timer debug output does not report to which timer a condition refers\nto. Fix that by printing the Timer address.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/base/event_dispatcher_poll.cpp | 3 ++-\n src/libcamera/base/timer.cpp                 | 4 ++--\n 2 files changed, 4 insertions(+), 3 deletions(-)","diff":"diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\nindex 8ee22d5adcc4..7238a3165da8 100644\n--- a/src/libcamera/base/event_dispatcher_poll.cpp\n+++ b/src/libcamera/base/event_dispatcher_poll.cpp\n@@ -214,7 +214,8 @@ int EventDispatcherPoll::poll(std::vector<struct pollfd> *pollfds)\n \t\t\ttimeout = { 0, 0 };\n \n \t\tLOG(Event, Debug)\n-\t\t\t<< \"timeout \" << timeout.tv_sec << \".\"\n+\t\t\t<< \"next timer \" << nextTimer << \" expires in \"\n+\t\t\t<< timeout.tv_sec << \".\"\n \t\t\t<< std::setfill('0') << std::setw(9)\n \t\t\t<< timeout.tv_nsec;\n \t}\ndiff --git a/src/libcamera/base/timer.cpp b/src/libcamera/base/timer.cpp\nindex 9c54352d46bd..187336e3a1a4 100644\n--- a/src/libcamera/base/timer.cpp\n+++ b/src/libcamera/base/timer.cpp\n@@ -96,7 +96,7 @@ void Timer::start(std::chrono::milliseconds duration)\n void Timer::start(std::chrono::steady_clock::time_point deadline)\n {\n \tif (Thread::current() != thread()) {\n-\t\tLOG(Timer, Error) << \"Timer can't be started from another thread\";\n+\t\tLOG(Timer, Error) << \"Timer \" << this << \" << can't be started from another thread\";\n \t\treturn;\n \t}\n \n@@ -128,7 +128,7 @@ void Timer::stop()\n \t\treturn;\n \n \tif (Thread::current() != thread()) {\n-\t\tLOG(Timer, Error) << \"Timer can't be stopped from another thread\";\n+\t\tLOG(Timer, Error) << \"Timer \" << this << \" can't be stopped from another thread\";\n \t\treturn;\n \t}\n \n","prefixes":["libcamera-devel","v6","01/11"]}