android: camera_stream: Add thread safety annotation

This applies clang thread safety annotation to CameraStream.

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>
This commit is contained in:
Hirokazu Honda 2021-12-01 16:53:45 +09:00 committed by Laurent Pinchart
parent 5e0d3a3517
commit 97ab0074ec
2 changed files with 6 additions and 4 deletions

View file

@ -275,7 +275,7 @@ void CameraStream::PostProcessorWorker::run()
MutexLocker locker(mutex_);
while (1) {
cv_.wait(locker, [&] {
cv_.wait(locker, [&]() LIBCAMERA_TSA_REQUIRES(mutex_) {
return state_ != State::Running || !requests_.empty();
});