From 923cf7f40a7f1875874384b30a7c8dcb1f23467a Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Wed, 1 Dec 2021 16:53:37 +0900 Subject: libcamera: base: Introduce ConditionVariable ConditionVariable is alias to std::condition_variable. This replaces std::condition_variable with the ConditionVariable. It enables replacing ConditionVariable implementation easily in the following patches. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain Signed-off-by: Laurent Pinchart --- include/libcamera/base/semaphore.h | 4 +--- include/libcamera/base/thread.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libcamera/base/semaphore.h b/include/libcamera/base/semaphore.h index ae87d319..ec05fad3 100644 --- a/include/libcamera/base/semaphore.h +++ b/include/libcamera/base/semaphore.h @@ -7,8 +7,6 @@ #pragma once -#include - #include #include @@ -26,7 +24,7 @@ public: private: Mutex mutex_; - std::condition_variable cv_; + ConditionVariable cv_; unsigned int available_; }; diff --git a/include/libcamera/base/thread.h b/include/libcamera/base/thread.h index 32ebc80a..1ebf8363 100644 --- a/include/libcamera/base/thread.h +++ b/include/libcamera/base/thread.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -26,6 +27,7 @@ class Object; class ThreadData; class ThreadMain; +using ConditionVariable = std::condition_variable; using Mutex = std::mutex; using MutexLocker = std::unique_lock; -- cgit v1.2.1