summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-12-01 16:53:43 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-01 13:46:50 +0200
commitd5fb676ed524863371d6916aa9aa4408185bcb3e (patch)
tree40e0bcda145473932ad74a886666c6ce708c5fcd /src/android
parent7e91f951604c17a091b8c05efa1d01eddbcdfdbf (diff)
android: camera_hal_manager: Add thread safety annotation
This applies clang thread safety annotation to CameraHalManager. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_hal_manager.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
index 765701b2..a5f8b933 100644
--- a/src/android/camera_hal_manager.h
+++ b/src/android/camera_hal_manager.h
@@ -53,14 +53,14 @@ private:
void cameraAdded(std::shared_ptr<libcamera::Camera> cam);
void cameraRemoved(std::shared_ptr<libcamera::Camera> cam);
- CameraDevice *cameraDeviceFromHalId(unsigned int id);
+ CameraDevice *cameraDeviceFromHalId(unsigned int id) LIBCAMERA_TSA_REQUIRES(mutex_);
std::unique_ptr<libcamera::CameraManager> cameraManager_;
CameraHalConfig halConfig_;
const camera_module_callbacks_t *callbacks_;
- std::vector<std::unique_ptr<CameraDevice>> cameras_;
- std::map<std::string, unsigned int> cameraIdsMap_;
+ std::vector<std::unique_ptr<CameraDevice>> cameras_ LIBCAMERA_TSA_GUARDED_BY(mutex_);
+ std::map<std::string, unsigned int> cameraIdsMap_ LIBCAMERA_TSA_GUARDED_BY(mutex_);
libcamera::Mutex mutex_;
unsigned int numInternalCameras_;