From patchwork Tue Nov 30 15:56:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 14909 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6E5E0BF415 for ; Tue, 30 Nov 2021 15:56:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1FE6060723; Tue, 30 Nov 2021 16:56:37 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="EeKYGWW0"; dkim-atps=neutral Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1CB1C6073A for ; Tue, 30 Nov 2021 16:56:31 +0100 (CET) Received: by mail-pl1-x62a.google.com with SMTP id q17so15243812plr.11 for ; Tue, 30 Nov 2021 07:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AD01gBVUs4CQ+fjG7LPawvO1+zYxIXKwRgpkBIL4u8I=; b=EeKYGWW0JxpblE7rBI5ROa8y47uV9a0n1Ud8lhk1xrF2l9SIUOJYbHz2ey5frxTYbA Z1lBp3LSfZ4oyXJrzY4ZE/dsC+r7BGeTtu6fOrSzp8F/ZSQ2heGHxtWPsXj4yv9SkTiD 4qojWk6Dq7TticmsePbfYIj4DtKR733UHnB8w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AD01gBVUs4CQ+fjG7LPawvO1+zYxIXKwRgpkBIL4u8I=; b=JNH4O+4RuIgNHYVK1me+KxMpCiAd9AhP7uRUTxM6C4yJzgVtcV9BaT38hht+YLnpYK liwfSHqOpnAr6Mejkga6CD9zmVKy68/E4BcrHsAFCZhoZMO8ubv+wWh7+xnHeJ7W2JeX 88tOUr0tPoVnCkxZxc1GUvuRQeNc4/+47QXzmanppqpxzFahiw0KKIcF6w2VbrItptLn /cYL1SRLelI+Sx8ruG1Lo2QAgEo80PAM9rax5pZZEJMkhFup6sdPenTcXEjf467OjoZd 3K2a4tD9MgNGsY79orjyTCW5/kSeMozow41od1pT7V5fSOIEbgeSHoZ5OlCpfjtIsP8m Hf8A== X-Gm-Message-State: AOAM5320dIcZ7SON4PkAzp4mur4IGWf0uCAIBVMsZSeVAaUMh1Cn06+i El+CvrcLId0k4+AvQDQp4fIFfYtgWMBFYQ== X-Google-Smtp-Source: ABdhPJzt5S72dL3cWzddfy2WusDnOjwQ1oZ+KaMMDwXRfAKbEcZ/KqTgWnpn+EzxP2dWjdXNoFsb0Q== X-Received: by 2002:a17:90a:e7cc:: with SMTP id kb12mr32513pjb.172.1638287789497; Tue, 30 Nov 2021 07:56:29 -0800 (PST) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:c90a:5a53:b139:1336]) by smtp.gmail.com with ESMTPSA id pc10sm3510283pjb.9.2021.11.30.07.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 07:56:28 -0800 (PST) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Dec 2021 00:56:00 +0900 Message-Id: <20211130155600.2203123-13-hiroh@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211130155600.2203123-1-hiroh@chromium.org> References: <20211130155600.2203123-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 12/12] android: camera_request: Add thread safety annotation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This applies clang thread safety annotation to Camera3RequestDescriptor. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart --- src/android/camera_request.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/android/camera_request.h b/src/android/camera_request.h index 887dbe86..dfdc3324 100644 --- a/src/android/camera_request.h +++ b/src/android/camera_request.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -57,7 +58,8 @@ public: }; /* Keeps track of streams requiring post-processing. */ - std::map pendingStreamsToProcess_; + std::map pendingStreamsToProcess_ + LIBCAMERA_TSA_GUARDED_BY(streamsProcessMutex_); libcamera::Mutex streamsProcessMutex_; Camera3RequestDescriptor(libcamera::Camera *camera,