Patch Detail
Show a patch.
GET /api/1.1/patches/2691/?format=api
{ "id": 2691, "url": "https://patchwork.libcamera.org/api/1.1/patches/2691/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2691/", "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": "<20200120002437.6633-5-laurent.pinchart@ideasonboard.com>", "date": "2020-01-20T00:24:22", "name": "[libcamera-devel,04/19] libcamera: log: Print the thread ID in the log", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "278f220dd34559d62dd1fd64580233da460b10cf", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2691/mbox/", "series": [ { "id": 641, "url": "https://patchwork.libcamera.org/api/1.1/series/641/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=641", "date": "2020-01-20T00:24:19", "name": "Initial libcamera threading model", "version": 1, "mbox": "https://patchwork.libcamera.org/series/641/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2691/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2691/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C3513607DB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jan 2020 01:24:43 +0100 (CET)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6AA16529\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jan 2020 01:24:43 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1579479883;\n\tbh=Fi21uGDu0oFxJxnP0nwK/btgHGo7AKOL9YN71odSnMo=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=lH7l+Kv3zPSR9q/zG06Ck/hp6N4fEn20GlS/CtdnbnlutiS2stVSzP88/n4/D+ggn\n\tfv5EyMItUx++X1wO7kYb+UzmPhZ0wnaSeqR0vBo18bG3UAdkHEGHhscMkEjBeJJOIj\n\tstb+6gnjJD0HKJxVnveCruauJAXlPIaeuvkKu47I=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 20 Jan 2020 02:24:22 +0200", "Message-Id": "<20200120002437.6633-5-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200120002437.6633-1-laurent.pinchart@ideasonboard.com>", "References": "<20200120002437.6633-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 04/19] libcamera: log: Print the thread ID\n\tin the log", "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>", "X-List-Received-Date": "Mon, 20 Jan 2020 00:24:44 -0000" }, "content": "The current thread ID is useful when debugging concurrency issues. Print\nit in log messages. The syslog target is left out as the thread ID would\nhave little use there, and partly duplicates the process ID.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/log.cpp | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\nindex f4eb8c11adc3..1dac4666b435 100644\n--- a/src/libcamera/log.cpp\n+++ b/src/libcamera/log.cpp\n@@ -22,6 +22,7 @@\n \n #include <libcamera/logging.h>\n \n+#include \"thread.h\"\n #include \"utils.h\"\n \n /**\n@@ -196,7 +197,8 @@ void LogOutput::write(const LogMessage &msg)\n \t\tbreak;\n \tcase LoggingTargetStream:\n \tcase LoggingTargetFile:\n-\t\tstr = \"[\" + utils::time_point_to_string(msg.timestamp()) + \"]\"\n+\t\tstr = \"[\" + utils::time_point_to_string(msg.timestamp()) + \"] [\"\n+\t\t + std::to_string(Thread::currentId()) + \"]\"\n \t\t + log_severity_name(msg.severity()) + \" \"\n \t\t + msg.category().name() + \" \" + msg.fileInfo() + \" \"\n \t\t + msg.msg();\n", "prefixes": [ "libcamera-devel", "04/19" ] }