Patch Detail
Show a patch.
GET /api/1.1/patches/19423/?format=api
{ "id": 19423, "url": "https://patchwork.libcamera.org/api/1.1/patches/19423/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19423/", "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": "<20240121035948.4226-3-laurent.pinchart@ideasonboard.com>", "date": "2024-01-21T03:59:38", "name": "[libcamera-devel,02/12] libcamera: signal: Replace object.h inclusion with forward declatation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ad1acf607c34be3ae91e2b9ee74697560bfb8032", "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/19423/mbox/", "series": [ { "id": 4149, "url": "https://patchwork.libcamera.org/api/1.1/series/4149/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4149", "date": "2024-01-21T03:59:36", "name": "libcamera: Hardening against thread race conditions", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4149/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19423/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19423/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 CF76FC32BC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 21 Jan 2024 03:59:50 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A273B6293E;\n\tSun, 21 Jan 2024 04:59:49 +0100 (CET)", "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 9267661D30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 21 Jan 2024 04:59:48 +0100 (CET)", "from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 839288D4;\n\tSun, 21 Jan 2024 04:58:36 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705809589;\n\tbh=EEM3IQqZiHYZ5usYYAwswhlLDeBS4Vs4LmZfGpSEkXo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=ajzwazlMk6ShFFGBFZnvmgw0oN4cjm6aDb5O54lpIvl3dgyDB6IzXg4McNaGKyB4s\n\tefx9e4mo5aNY7bC0HMG2e9HEql6OOtkdk6Q40ZE6QFNAEAneaf7cAfLMloYiTloDpz\n\tVQWy808y4yLdq+B+V+60NSNcrqrGB+j0djaVag0cOIPt/Th7KS5cCM6ZFWvCxt2IRi\n\tpQOc1PhV5liW1FWQb4XUdnfHD/kR0fv97LmRiMSqnzuxZ7o0HOxJXLhb7HamtsdUc7\n\twAkHeTVNCVFlcng8Aa4mo+BFw/no2F5X579YwolXuy0SC8Qq5i9cw4kufEHWdKYpcW\n\twteblVcHPlR4w==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705809516;\n\tbh=EEM3IQqZiHYZ5usYYAwswhlLDeBS4Vs4LmZfGpSEkXo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=gm/+XGs85T27UA1Xe5kSzu4zJyKI3lpXUDl0f/tOVEcwH1PeqvzSislT05AW5wzRO\n\tdzZPT44BLVysl/AapDIoYAzaEnf9tmWjLjWckfC4aPNCdrS7C0nahWMWjIATu/gwok\n\tYneAwsE3lhgQ+9ikKAQ/MqvL6AHg6lVDjLFeRvuI=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"gm/+XGs8\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 21 Jan 2024 05:59:38 +0200", "Message-ID": "<20240121035948.4226-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240121035948.4226-1-laurent.pinchart@ideasonboard.com>", "References": "<20240121035948.4226-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 02/12] libcamera: signal: Replace object.h\n\tinclusion with forward declatation", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The signal.h header doesn't need to include object.h. Replace it with a\nforward declaration, and instead include object.h in source files that\nrequire it. To can speed up compilation a little bit, but more\nimportantly avoids unintended dependencies from the Signal class to the\nObject class to be added later as the compiler will catch them.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/base/signal.h | 3 ++-\n src/libcamera/base/bound_method.cpp | 1 +\n src/libcamera/base/signal.cpp | 1 +\n src/libcamera/base/thread.cpp | 1 +\n test/event-thread.cpp | 1 +\n test/ipa/ipa_interface_test.cpp | 1 +\n test/message.cpp | 1 +\n test/signal-threads.cpp | 1 +\n test/timer-thread.cpp | 1 +\n .../ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl | 1 +\n 10 files changed, 11 insertions(+), 1 deletion(-)", "diff": "diff --git a/include/libcamera/base/signal.h b/include/libcamera/base/signal.h\nindex 841e4b4ca15c..444997b4525d 100644\n--- a/include/libcamera/base/signal.h\n+++ b/include/libcamera/base/signal.h\n@@ -13,10 +13,11 @@\n #include <vector>\n \n #include <libcamera/base/bound_method.h>\n-#include <libcamera/base/object.h>\n \n namespace libcamera {\n \n+class Object;\n+\n class SignalBase\n {\n public:\ndiff --git a/src/libcamera/base/bound_method.cpp b/src/libcamera/base/bound_method.cpp\nindex 3ecec51c4b75..c83d623f107d 100644\n--- a/src/libcamera/base/bound_method.cpp\n+++ b/src/libcamera/base/bound_method.cpp\n@@ -7,6 +7,7 @@\n \n #include <libcamera/base/bound_method.h>\n #include <libcamera/base/message.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/semaphore.h>\n #include <libcamera/base/thread.h>\n \ndiff --git a/src/libcamera/base/signal.cpp b/src/libcamera/base/signal.cpp\nindex a46386a05abf..de51d060c21a 100644\n--- a/src/libcamera/base/signal.cpp\n+++ b/src/libcamera/base/signal.cpp\n@@ -8,6 +8,7 @@\n #include <libcamera/base/signal.h>\n \n #include <libcamera/base/mutex.h>\n+#include <libcamera/base/object.h>\n \n /**\n * \\file base/signal.h\ndiff --git a/src/libcamera/base/thread.cpp b/src/libcamera/base/thread.cpp\nindex b96951ac19ba..75693c92a0b1 100644\n--- a/src/libcamera/base/thread.cpp\n+++ b/src/libcamera/base/thread.cpp\n@@ -18,6 +18,7 @@\n #include <libcamera/base/log.h>\n #include <libcamera/base/message.h>\n #include <libcamera/base/mutex.h>\n+#include <libcamera/base/object.h>\n \n /**\n * \\page thread Thread Support\ndiff --git a/test/event-thread.cpp b/test/event-thread.cpp\nindex ef8a52c3de55..88a8c07ef9f0 100644\n--- a/test/event-thread.cpp\n+++ b/test/event-thread.cpp\n@@ -11,6 +11,7 @@\n #include <unistd.h>\n \n #include <libcamera/base/event_notifier.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/thread.h>\n #include <libcamera/base/timer.h>\n \ndiff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\nindex 051ef96e7ed2..56f3cd6d57ba 100644\n--- a/test/ipa/ipa_interface_test.cpp\n+++ b/test/ipa/ipa_interface_test.cpp\n@@ -16,6 +16,7 @@\n \n #include <libcamera/base/event_dispatcher.h>\n #include <libcamera/base/event_notifier.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/thread.h>\n #include <libcamera/base/timer.h>\n \ndiff --git a/test/message.cpp b/test/message.cpp\nindex d148a13d6c7a..0e76f323e3b9 100644\n--- a/test/message.cpp\n+++ b/test/message.cpp\n@@ -11,6 +11,7 @@\n #include <thread>\n \n #include <libcamera/base/message.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/thread.h>\n \n #include \"test.h\"\ndiff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\nindex d5e2eb662df2..8c550eb014d8 100644\n--- a/test/signal-threads.cpp\n+++ b/test/signal-threads.cpp\n@@ -10,6 +10,7 @@\n #include <thread>\n \n #include <libcamera/base/message.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/thread.h>\n #include <libcamera/base/utils.h>\n \ndiff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\nindex 618217538779..0bcd0d8ce194 100644\n--- a/test/timer-thread.cpp\n+++ b/test/timer-thread.cpp\n@@ -9,6 +9,7 @@\n #include <iostream>\n \n #include <libcamera/base/event_dispatcher.h>\n+#include <libcamera/base/object.h>\n #include <libcamera/base/thread.h>\n #include <libcamera/base/timer.h>\n \ndiff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\nindex ed270f5cd49c..6e823598930e 100644\n--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n@@ -18,6 +18,7 @@\n #include <libcamera/ipa/ipa_interface.h>\n #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n \n+#include <libcamera/base/object.h>\n #include <libcamera/base/thread.h>\n \n #include \"libcamera/internal/control_serializer.h\"\n", "prefixes": [ "libcamera-devel", "02/12" ] }