@@ -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);
This annotates member functions of V4L2CameraProxy by clang thread safety annotations. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> --- src/v4l2/v4l2_camera_proxy.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)