From patchwork Sun Jan 21 03:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19423 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CF76FC32BC for ; Sun, 21 Jan 2024 03:59:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A273B6293E; Sun, 21 Jan 2024 04:59:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1705809589; bh=EEM3IQqZiHYZ5usYYAwswhlLDeBS4Vs4LmZfGpSEkXo=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ajzwazlMk6ShFFGBFZnvmgw0oN4cjm6aDb5O54lpIvl3dgyDB6IzXg4McNaGKyB4s efx9e4mo5aNY7bC0HMG2e9HEql6OOtkdk6Q40ZE6QFNAEAneaf7cAfLMloYiTloDpz VQWy808y4yLdq+B+V+60NSNcrqrGB+j0djaVag0cOIPt/Th7KS5cCM6ZFWvCxt2IRi pQOc1PhV5liW1FWQb4XUdnfHD/kR0fv97LmRiMSqnzuxZ7o0HOxJXLhb7HamtsdUc7 wAkHeTVNCVFlcng8Aa4mo+BFw/no2F5X579YwolXuy0SC8Qq5i9cw4kufEHWdKYpcW wteblVcHPlR4w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9267661D30 for ; Sun, 21 Jan 2024 04:59:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gm/+XGs8"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi [89.27.53.110]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 839288D4; Sun, 21 Jan 2024 04:58:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1705809516; bh=EEM3IQqZiHYZ5usYYAwswhlLDeBS4Vs4LmZfGpSEkXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gm/+XGs85T27UA1Xe5kSzu4zJyKI3lpXUDl0f/tOVEcwH1PeqvzSislT05AW5wzRO dzZPT44BLVysl/AapDIoYAzaEnf9tmWjLjWckfC4aPNCdrS7C0nahWMWjIATu/gwok YneAwsE3lhgQ+9ikKAQ/MqvL6AHg6lVDjLFeRvuI= 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 Subject: [libcamera-devel] [PATCH 02/12] libcamera: signal: Replace object.h inclusion with forward declatation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The signal.h header doesn't need to include object.h. Replace it with a forward declaration, and instead include object.h in source files that require it. To can speed up compilation a little bit, but more importantly avoids unintended dependencies from the Signal class to the Object class to be added later as the compiler will catch them. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal --- include/libcamera/base/signal.h | 3 ++- src/libcamera/base/bound_method.cpp | 1 + src/libcamera/base/signal.cpp | 1 + src/libcamera/base/thread.cpp | 1 + test/event-thread.cpp | 1 + test/ipa/ipa_interface_test.cpp | 1 + test/message.cpp | 1 + test/signal-threads.cpp | 1 + test/timer-thread.cpp | 1 + .../ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl | 1 + 10 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/libcamera/base/signal.h b/include/libcamera/base/signal.h index 841e4b4ca15c..444997b4525d 100644 --- a/include/libcamera/base/signal.h +++ b/include/libcamera/base/signal.h @@ -13,10 +13,11 @@ #include #include -#include namespace libcamera { +class Object; + class SignalBase { public: diff --git a/src/libcamera/base/bound_method.cpp b/src/libcamera/base/bound_method.cpp index 3ecec51c4b75..c83d623f107d 100644 --- a/src/libcamera/base/bound_method.cpp +++ b/src/libcamera/base/bound_method.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/src/libcamera/base/signal.cpp b/src/libcamera/base/signal.cpp index a46386a05abf..de51d060c21a 100644 --- a/src/libcamera/base/signal.cpp +++ b/src/libcamera/base/signal.cpp @@ -8,6 +8,7 @@ #include #include +#include /** * \file base/signal.h diff --git a/src/libcamera/base/thread.cpp b/src/libcamera/base/thread.cpp index b96951ac19ba..75693c92a0b1 100644 --- a/src/libcamera/base/thread.cpp +++ b/src/libcamera/base/thread.cpp @@ -18,6 +18,7 @@ #include #include #include +#include /** * \page thread Thread Support diff --git a/test/event-thread.cpp b/test/event-thread.cpp index ef8a52c3de55..88a8c07ef9f0 100644 --- a/test/event-thread.cpp +++ b/test/event-thread.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp index 051ef96e7ed2..56f3cd6d57ba 100644 --- a/test/ipa/ipa_interface_test.cpp +++ b/test/ipa/ipa_interface_test.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/test/message.cpp b/test/message.cpp index d148a13d6c7a..0e76f323e3b9 100644 --- a/test/message.cpp +++ b/test/message.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include "test.h" diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp index d5e2eb662df2..8c550eb014d8 100644 --- a/test/signal-threads.cpp +++ b/test/signal-threads.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp index 618217538779..0bcd0d8ce194 100644 --- a/test/timer-thread.cpp +++ b/test/timer-thread.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl index ed270f5cd49c..6e823598930e 100644 --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl @@ -18,6 +18,7 @@ #include #include +#include #include #include "libcamera/internal/control_serializer.h"