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

Hirokazu Honda hiroh at chromium.org
Fri Dec 3 17:46:12 CET 2021


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.

Hirokazu Honda (7):
  libcamera: base: semaphore: Apply clang thread safety annotation
  libcamera: base: thread: Protect exitCode by mutex in exit()
  libcamera: base: thread: Apply clang thread safety annotation
  libcamera: camera_manager: Protect cameras_ by mutex in cleanup()
  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   |  2 +-
 src/libcamera/base/thread.cpp      | 24 +++++++++++++++++-------
 src/libcamera/camera_manager.cpp   | 20 ++++++++++++--------
 src/v4l2/v4l2_camera.cpp           |  5 ++---
 src/v4l2/v4l2_camera.h             | 14 ++++++++------
 src/v4l2/v4l2_camera_proxy.h       | 14 ++++++++------
 7 files changed, 53 insertions(+), 36 deletions(-)

--
2.34.0.384.gca35af8252-goog


More information about the libcamera-devel mailing list