[libcamera-devel] [PATCH v3 0/5] Apply clang thread safety annotation libcamera-core and v4l2

Umang Jain umang.jain at ideasonboard.com
Thu Nov 3 14:20:36 CET 2022


(Original cover letter by Hiro)
This applies clang thread safety annotations to libcamera/base, and
libcamera/camera_manager and v4l2. I cannot annotate Signal and some
variables in thread.cpp is because the used Mutexes are invisible
from their header files.

Changes in v3:
- Address Laurent's reviews from v2
  - No functional changes, improve readability by reflowing statements
- Remove TSA for exitCode_ from 2/5
- Protect cameras_ on cleanup() by taking a lock in 3/5 so that TSA
  is satisfied

Hirokazu Honda (5):
  libcamera: base: semaphore: Apply clang thread safety annotation
  libcamera: base: thread: Apply clang thread safety annotation
  libcamera: camera_manager: Apply clang thread safety annotation
  v4l2: v4l2_camera_proxy: Apply clang thread safety annotation
  v4l2: v4l2_camera: Apply clang thread safety annotation

 include/libcamera/base/semaphore.h | 10 +++++-----
 src/libcamera/base/semaphore.cpp   |  4 +++-
 src/libcamera/base/thread.cpp      | 10 +++++++---
 src/libcamera/camera_manager.cpp   | 24 +++++++++++++++---------
 src/v4l2/v4l2_camera.cpp           |  5 ++---
 src/v4l2/v4l2_camera.h             | 14 ++++++++------
 src/v4l2/v4l2_camera_proxy.h       | 12 +++++++-----
 7 files changed, 47 insertions(+), 32 deletions(-)

-- 
2.37.3



More information about the libcamera-devel mailing list