[libcamera-devel,v3,12/12] android: camera_request: Add thread safety annotation
diff mbox series

Message ID 20211130155600.2203123-13-hiroh@chromium.org
State Superseded
Headers show
Series
  • Introduce clang thread safety annotations
Related show

Commit Message

Hirokazu Honda Nov. 30, 2021, 3:56 p.m. UTC
This applies clang thread safety annotation to
Camera3RequestDescriptor.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/android/camera_request.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/android/camera_request.h b/src/android/camera_request.h
index 887dbe86..dfdc3324 100644
--- a/src/android/camera_request.h
+++ b/src/android/camera_request.h
@@ -13,6 +13,7 @@ 
 
 #include <libcamera/base/class.h>
 #include <libcamera/base/mutex.h>
+#include <libcamera/base/thread_annotations.h>
 
 #include <libcamera/camera.h>
 #include <libcamera/framebuffer.h>
@@ -57,7 +58,8 @@  public:
 	};
 
 	/* Keeps track of streams requiring post-processing. */
-	std::map<CameraStream *, StreamBuffer *> pendingStreamsToProcess_;
+	std::map<CameraStream *, StreamBuffer *> pendingStreamsToProcess_
+		LIBCAMERA_TSA_GUARDED_BY(streamsProcessMutex_);
 	libcamera::Mutex streamsProcessMutex_;
 
 	Camera3RequestDescriptor(libcamera::Camera *camera,