summaryrefslogtreecommitdiff
path: root/src/v4l2
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-12-01 16:53:41 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-01 13:46:47 +0200
commitc17f172842d17b6036e10b1775e89d0219c3b3f9 (patch)
tree6ce969f3be6e8d000c3ad9eb8eb6c351ac3b008c /src/v4l2
parent16efd83f5dafb8261aac2e955576bc7d474043f9 (diff)
libcamera: base: Add mutex classes with thread safety annotations
This replaces Mutex and MutexLocker with our own defined classes. The classes are annotated by clang thread safety annotations. So we can add annotation to code where the classes are used. v4l2 code needs to be annotated, which violates Mutex capability. 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/v4l2')
-rw-r--r--src/v4l2/v4l2_camera_proxy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h
index 040954dd..fa0a49e0 100644
--- a/src/v4l2/v4l2_camera_proxy.h
+++ b/src/v4l2/v4l2_camera_proxy.h
@@ -14,7 +14,7 @@
#include <sys/types.h>
#include <vector>
-#include <libcamera/base/thread.h>
+#include <libcamera/base/mutex.h>
#include <libcamera/camera.h>
@@ -59,7 +59,7 @@ private:
int vidioc_querybuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
int vidioc_qbuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
int vidioc_dqbuf(V4L2CameraFile *file, struct v4l2_buffer *arg,
- libcamera::Mutex *lock);
+ libcamera::Mutex *lock) LIBCAMERA_TSA_REQUIRES(*lock);
int vidioc_streamon(V4L2CameraFile *file, int *arg);
int vidioc_streamoff(V4L2CameraFile *file, int *arg);