diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2021-12-01 16:53:39 +0900 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-12-01 13:46:44 +0200 |
commit | 7b86854e4014b10844848f9619c648e6ccfbf9c6 (patch) | |
tree | eb59df9a9ee46ce57343feec67dfbb2f57d8a978 /src/v4l2/v4l2_camera.h | |
parent | 3536473e06f9abe5027b25db3b97900bf474bccf (diff) |
v4l2: Consolidate mutex classes to Mutex and MutexLocker
std::mutex and std::unique_lock are used in v4l2 directory,
mixing Mutex and MutexLocker. This consolidates them to Mutex
and MutexLocker.
This also fixes vidioc_dqbuf argument to take Mutex instead of
MutexLocker.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_camera.h')
-rw-r--r-- | src/v4l2/v4l2_camera.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h index 4afbb331..bf1b6de4 100644 --- a/src/v4l2/v4l2_camera.h +++ b/src/v4l2/v4l2_camera.h @@ -8,10 +8,10 @@ #pragma once #include <deque> -#include <mutex> #include <utility> #include <libcamera/base/semaphore.h> +#include <libcamera/base/thread.h> #include <libcamera/camera.h> #include <libcamera/file_descriptor.h> @@ -71,7 +71,7 @@ private: bool isRunning_; - std::mutex bufferLock_; + libcamera::Mutex bufferLock_; libcamera::FrameBufferAllocator *bufferAllocator_; std::vector<std::unique_ptr<libcamera::Request>> requestPool_; |