summaryrefslogtreecommitdiff
path: root/src/libcamera/base/semaphore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/base/semaphore.cpp')
-rw-r--r--src/libcamera/base/semaphore.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcamera/base/semaphore.cpp b/src/libcamera/base/semaphore.cpp
index 4fe30293..6217e386 100644
--- a/src/libcamera/base/semaphore.cpp
+++ b/src/libcamera/base/semaphore.cpp
@@ -56,7 +56,9 @@ unsigned int Semaphore::available()
void Semaphore::acquire(unsigned int n)
{
MutexLocker locker(mutex_);
- cv_.wait(locker, [&] { return available_ >= n; });
+ cv_.wait(locker, [&]() LIBCAMERA_TSA_REQUIRES(mutex_) {
+ return available_ >= n;
+ });
available_ -= n;
}