[libcamera-devel] [PATCH v4 06/12] libcamera: Correct include headers for Mutex classes

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Dec 1 08:27:55 CET 2021


Hi Hiro,

Thank you for the patch.

On Wed, Dec 01, 2021 at 04:07:22PM +0900, Hirokazu Honda wrote:
> Mutex classes are defined in mutex.h. This replaces thread.h
> include for the Mutex classes with mutex.h.
> 
> Signed-off-by: Hirokazu Honda <hiroh at chromium.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  include/libcamera/base/semaphore.h | 3 ++-
>  include/libcamera/base/thread.h    | 1 -
>  src/android/camera_device.cpp      | 1 -
>  src/android/camera_device.h        | 2 +-
>  src/android/camera_hal_manager.h   | 2 +-
>  src/android/camera_request.h       | 2 +-
>  src/android/camera_stream.h        | 1 +
>  src/libcamera/base/semaphore.cpp   | 1 -
>  src/libcamera/base/signal.cpp      | 2 +-
>  src/libcamera/base/thread.cpp      | 1 +
>  src/libcamera/camera_manager.cpp   | 1 +
>  src/v4l2/v4l2_camera.h             | 2 +-
>  12 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/include/libcamera/base/semaphore.h b/include/libcamera/base/semaphore.h
> index ec05fad3..c11e8dd1 100644
> --- a/include/libcamera/base/semaphore.h
> +++ b/include/libcamera/base/semaphore.h
> @@ -8,7 +8,8 @@
>  #pragma once
>  
>  #include <libcamera/base/private.h>
> -#include <libcamera/base/thread.h>
> +
> +#include <libcamera/base/mutex.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/base/thread.h b/include/libcamera/base/thread.h
> index 44678c34..9d00f102 100644
> --- a/include/libcamera/base/thread.h
> +++ b/include/libcamera/base/thread.h
> @@ -14,7 +14,6 @@
>  #include <libcamera/base/private.h>
>  
>  #include <libcamera/base/message.h>
> -#include <libcamera/base/mutex.h>
>  #include <libcamera/base/signal.h>
>  #include <libcamera/base/utils.h>
>  
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index f2e0bdbd..d74307a2 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -14,7 +14,6 @@
>  #include <vector>
>  
>  #include <libcamera/base/log.h>
> -#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>  
>  #include <libcamera/control_ids.h>
> diff --git a/src/android/camera_device.h b/src/android/camera_device.h
> index bda0b376..a945f5de 100644
> --- a/src/android/camera_device.h
> +++ b/src/android/camera_device.h
> @@ -17,7 +17,7 @@
>  #include <libcamera/base/class.h>
>  #include <libcamera/base/log.h>
>  #include <libcamera/base/message.h>
> -#include <libcamera/base/thread.h>
> +#include <libcamera/base/mutex.h>
>  
>  #include <libcamera/camera.h>
>  #include <libcamera/framebuffer.h>
> diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
> index cc310f90..765701b2 100644
> --- a/src/android/camera_hal_manager.h
> +++ b/src/android/camera_hal_manager.h
> @@ -17,7 +17,7 @@
>  #include <system/camera_metadata.h>
>  
>  #include <libcamera/base/class.h>
> -#include <libcamera/base/thread.h>
> +#include <libcamera/base/mutex.h>
>  
>  #include <libcamera/camera_manager.h>
>  
> diff --git a/src/android/camera_request.h b/src/android/camera_request.h
> index 88d501a8..887dbe86 100644
> --- a/src/android/camera_request.h
> +++ b/src/android/camera_request.h
> @@ -12,7 +12,7 @@
>  #include <vector>
>  
>  #include <libcamera/base/class.h>
> -#include <libcamera/base/thread.h>
> +#include <libcamera/base/mutex.h>
>  
>  #include <libcamera/camera.h>
>  #include <libcamera/framebuffer.h>
> diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
> index adb5a37d..e4eb953a 100644
> --- a/src/android/camera_stream.h
> +++ b/src/android/camera_stream.h
> @@ -13,6 +13,7 @@
>  
>  #include <hardware/camera3.h>
>  
> +#include <libcamera/base/mutex.h>
>  #include <libcamera/base/thread.h>
>  
>  #include <libcamera/camera.h>
> diff --git a/src/libcamera/base/semaphore.cpp b/src/libcamera/base/semaphore.cpp
> index bf730c87..4fe30293 100644
> --- a/src/libcamera/base/semaphore.cpp
> +++ b/src/libcamera/base/semaphore.cpp
> @@ -6,7 +6,6 @@
>   */
>  
>  #include <libcamera/base/semaphore.h>
> -#include <libcamera/base/thread.h>
>  
>  /**
>   * \file base/semaphore.h
> diff --git a/src/libcamera/base/signal.cpp b/src/libcamera/base/signal.cpp
> index 9c2319c5..9df45d07 100644
> --- a/src/libcamera/base/signal.cpp
> +++ b/src/libcamera/base/signal.cpp
> @@ -7,7 +7,7 @@
>  
>  #include <libcamera/base/signal.h>
>  
> -#include <libcamera/base/thread.h>
> +#include <libcamera/base/mutex.h>
>  
>  /**
>   * \file base/signal.h
> diff --git a/src/libcamera/base/thread.cpp b/src/libcamera/base/thread.cpp
> index b2043b7e..6bda9d14 100644
> --- a/src/libcamera/base/thread.cpp
> +++ b/src/libcamera/base/thread.cpp
> @@ -17,6 +17,7 @@
>  #include <libcamera/base/event_dispatcher_poll.h>
>  #include <libcamera/base/log.h>
>  #include <libcamera/base/message.h>
> +#include <libcamera/base/mutex.h>
>  
>  /**
>   * \page thread Thread Support
> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
> index 77ff3bd1..70d73822 100644
> --- a/src/libcamera/camera_manager.cpp
> +++ b/src/libcamera/camera_manager.cpp
> @@ -12,6 +12,7 @@
>  #include <libcamera/camera.h>
>  
>  #include <libcamera/base/log.h>
> +#include <libcamera/base/mutex.h>
>  #include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>  
> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
> index bf1b6de4..9307d61d 100644
> --- a/src/v4l2/v4l2_camera.h
> +++ b/src/v4l2/v4l2_camera.h
> @@ -10,8 +10,8 @@
>  #include <deque>
>  #include <utility>
>  
> +#include <libcamera/base/mutex.h>
>  #include <libcamera/base/semaphore.h>
> -#include <libcamera/base/thread.h>
>  
>  #include <libcamera/camera.h>
>  #include <libcamera/file_descriptor.h>

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list