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

Message ID 20211203164619.1541033-1-hiroh@chromium.org
Headers show
Series
  • Apply clang thread safety annotation libcamera-core and v4l2
Related show

Message

Hirokazu Honda Dec. 3, 2021, 4:46 p.m. UTC
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

Comments

Hirokazu Honda Jan. 6, 2022, 3:06 a.m. UTC | #1
Hi all,

I am back from vacation.
gentle ping for review.

Thanks in advance.

On Sat, Dec 4, 2021 at 1:46 AM Hirokazu Honda <hiroh@chromium.org> wrote:
>
> 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