From patchwork Tue Oct 20 01:40:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10109 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 18C9ABDB1F for ; Tue, 20 Oct 2020 01:41:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D60E96052F; Tue, 20 Oct 2020 03:41:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fcDunE+X"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3DD2060CE6 for ; Tue, 20 Oct 2020 03:40:57 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D5C98309 for ; Tue, 20 Oct 2020 03:40:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1603158057; bh=26KzoJx9qWaZkCKCO4gPjO1Iu/nyX45r/CLqOaCLeh0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fcDunE+XmyeGbROi9B1R/TPiI+1dt0IlfUt+O3kZ0JJxMlLobFROEfixZMNkVaQgY YSDEvTizsj1iopqByAB2e5gNf4jWrXQKQj5LkknsiqrE6teTin9wOm50ZXeLt0wmDx kNOXNjx0elpqqbcANEtDII2tmi8WgLVYh1iZDXmQ= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 20 Oct 2020 04:40:03 +0300 Message-Id: <20201020014005.12783-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201020014005.12783-1-laurent.pinchart@ideasonboard.com> References: <20201020014005.12783-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/5] libcamera: camera_manager: Make CameraManager::Private::mutex_ mutable 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The mutex_ stored in the CameraManager::Private class is used to protect members that may need to be accessed from const functions. Make it mutable to allow this. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Paul Elder --- src/libcamera/camera_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 81785f919d8b..3fef69633028 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -50,7 +50,7 @@ public: * - initialized_ and status_ during initialization * - cameras_ and camerasByDevnum_ after initialization */ - Mutex mutex_; + mutable Mutex mutex_; std::vector> cameras_; std::map> camerasByDevnum_;