Show a patch.

GET /api/1.1/patches/14961/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 14961,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14961/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14961/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20211201142936.107405-2-jacopo@jmondi.org>",
    "date": "2021-12-01T14:29:26",
    "name": "[libcamera-devel,v4,01/11] libcamera: Print Timer identifier",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "0b38b9a3c41c7a42ff04d78f7005f9dbb4e4eb82",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/1.1/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/14961/mbox/",
    "series": [
        {
            "id": 2795,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2795/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2795",
            "date": "2021-12-01T14:29:25",
            "name": "libcamera: Add support for Fence",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2795/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14961/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14961/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 D2A7EC3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Dec 2021 14:28:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 797D96073F;\n\tWed,  1 Dec 2021 15:28:51 +0100 (CET)",
            "from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BF746604FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Dec 2021 15:28:49 +0100 (CET)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id DF9AFC0008;\n\tWed,  1 Dec 2021 14:28:48 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  1 Dec 2021 15:29:26 +0100",
        "Message-Id": "<20211201142936.107405-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.33.1",
        "In-Reply-To": "<20211201142936.107405-1-jacopo@jmondi.org>",
        "References": "<20211201142936.107405-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 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 | 9 +++++----\n src/libcamera/base/timer.cpp                 | 4 ++--\n 2 files changed, 7 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\nindex 8ee22d5adcc4..7c5a3bb39ff9 100644\n--- a/src/libcamera/base/event_dispatcher_poll.cpp\n+++ b/src/libcamera/base/event_dispatcher_poll.cpp\n@@ -213,10 +213,11 @@ int EventDispatcherPoll::poll(std::vector<struct pollfd> *pollfds)\n \t\telse\n \t\t\ttimeout = { 0, 0 };\n \n-\t\tLOG(Event, Debug)\n-\t\t\t<< \"timeout \" << timeout.tv_sec << \".\"\n-\t\t\t<< std::setfill('0') << std::setw(9)\n-\t\t\t<< timeout.tv_nsec;\n+                LOG(Event, Debug)\n+                        << \"next timer \" << nextTimer << \" expires in \"\n+                        << timeout.tv_sec << \".\"\n+                        << std::setfill('0') << std::setw(9)\n+                        << timeout.tv_nsec;\n \t}\n \n \treturn ppoll(pollfds->data(), pollfds->size(),\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",
        "v4",
        "01/11"
    ]
}