[libcamera-devel] [PATCH 6/7] v4l2: v4l2_camera_proxy: Apply clang thread safety annotation
Hirokazu Honda
hiroh at chromium.org
Fri Dec 3 17:46:18 CET 2021
This annotates member functions of V4L2CameraProxy by clang
thread safety annotations.
Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
---
src/v4l2/v4l2_camera_proxy.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h
index fa0a49e0..993562ef 100644
--- a/src/v4l2/v4l2_camera_proxy.h
+++ b/src/v4l2/v4l2_camera_proxy.h
@@ -27,12 +27,14 @@ class V4L2CameraProxy
public:
V4L2CameraProxy(unsigned int index, std::shared_ptr<libcamera::Camera> camera);
- int open(V4L2CameraFile *file);
- void close(V4L2CameraFile *file);
- void *mmap(void *addr, size_t length, int prot, int flags, off64_t offset);
- int munmap(void *addr, size_t length);
-
- int ioctl(V4L2CameraFile *file, unsigned long request, void *arg);
+ int open(V4L2CameraFile *file) LIBCAMERA_TSA_EXCLUDES(proxyMutex_);
+ void close(V4L2CameraFile *file) LIBCAMERA_TSA_EXCLUDES(proxyMutex_);
+ void *mmap(void *addr, size_t length, int prot, int flags, off64_t offset)
+ LIBCAMERA_TSA_EXCLUDES(proxyMutex_);
+ int munmap(void *addr, size_t length) LIBCAMERA_TSA_EXCLUDES(proxyMutex_);
+
+ int ioctl(V4L2CameraFile *file, unsigned long request, void *arg)
+ LIBCAMERA_TSA_EXCLUDES(proxyMutex_);
private:
bool validateBufferType(uint32_t type);
--
2.34.0.384.gca35af8252-goog
More information about the libcamera-devel
mailing list