[libcamera-devel] [PATCH 2/4] libcamera: camera_manager: Make CameraManager::Private::mutex_ mutable
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Sep 21 05:10:55 CEST 2020
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 <laurent.pinchart at ideasonboard.com>
---
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 47d56256abd6..780a66a7ac10 100644
--- a/src/libcamera/camera_manager.cpp
+++ b/src/libcamera/camera_manager.cpp
@@ -46,7 +46,7 @@ public:
* - initialized_ and status_ during initialization
* - cameras_ and camerasByDevnum_ after initialization
*/
- Mutex mutex_;
+ mutable Mutex mutex_;
std::vector<std::shared_ptr<Camera>> cameras_;
std::map<dev_t, std::weak_ptr<Camera>> camerasByDevnum_;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list