[libcamera-devel] [PATCH v2 11/11] android: camera_request: Add thread safety annotation
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Nov 30 05:34:25 CET 2021
Hi Hiro,
Thank you for the patch.
On Mon, Nov 29, 2021 at 08:44:53PM +0900, Hirokazu Honda wrote:
> This applies clang thread safety annotation to
> Camera3RequestDescriptor. Mutex and MutexLocker there are
> replaced with Mutex2 and MutexLocer2.
Not anymore :-)
> Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
> Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
> src/android/camera_request.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/android/camera_request.h b/src/android/camera_request.h
> index 88d501a8..dfdc3324 100644
> --- a/src/android/camera_request.h
> +++ b/src/android/camera_request.h
> @@ -12,7 +12,8 @@
> #include <vector>
>
> #include <libcamera/base/class.h>
> -#include <libcamera/base/thread.h>
> +#include <libcamera/base/mutex.h>
> +#include <libcamera/base/thread_annotations.h>
02/11 too.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> #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,
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list