From patchwork Wed Dec 1 07:53:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 14952 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 CC4BBBF415 for ; Wed, 1 Dec 2021 07:54:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8805B60726; Wed, 1 Dec 2021 08:54:19 +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="MYxZEy7d"; dkim-atps=neutral Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 63E626072E for ; Wed, 1 Dec 2021 08:54:17 +0100 (CET) Received: by mail-pg1-x52f.google.com with SMTP id r138so22682216pgr.13 for ; Tue, 30 Nov 2021 23:54:17 -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=uJYG3Nusw/zJT2sBNaxIou0h0BcaN6bUP3w8FXeB2XE=; b=MYxZEy7d8HWtbbD6Q3PRGz6u/6DmCOmOrNAZEuQZdfLTrys9oYTfg9PnMQPOeSD9u9 quW3sJhb28BZ5PvkUfVBGxQaK1aNInrWoOK25EUM0LkY7IUK1RRg+y3yYS2gQDj9mJEj eC96ngG66r4paGxrn41ZgvmOnfjDBPgUTFd3s= 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=uJYG3Nusw/zJT2sBNaxIou0h0BcaN6bUP3w8FXeB2XE=; b=XslOSXTUy4VTex5O1grJKvwOdu1pkjVAYTJfLXB01qvcs5UpRj7zGMGrShvld6Ci/U XTZgrNeHHY5l1VvgAHaSSvlXU2dDZ/0qmMMHQAx8WjNMOno6hBq1rqlwkYqqqi4S7I2L m+BJCBVrmHROXp+bqjAfRmuJtbUjO4t1+/nOPCWNsn3GrF6UVly8tWk/I0JxA6YvBdQD Eqf/Mb+UAFA58jp31L46iZZdwoezwCdZdEtelqxqfabYF9PdIVqmkYAH638aqilWEMvZ Nz2WvSydtsrG4vFxaJDhXBznAn29bJvHmaVuvBGGal8zM1E2U5uSnHkLEu3J21aDOrSo LPPw== X-Gm-Message-State: AOAM530PIB2rKeO5GD1cGqXoMJERX6dPC3V+42gFdl+UdUk1ZeaTshaX UdjChGPJlopp6nJqWPeC07dI4IskkxhfRA== X-Google-Smtp-Source: ABdhPJyT6cIt08yy25L3+SmnTOpjivWub0TjU/Vhn2eK+jcO0ffOoqAPzb1iBWtRW0T/456K4o/2sQ== X-Received: by 2002:a63:1d13:: with SMTP id d19mr3586408pgd.383.1638345255741; Tue, 30 Nov 2021 23:54:15 -0800 (PST) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:3892:a049:59ba:c772]) by smtp.gmail.com with ESMTPSA id l9sm3500848pfu.55.2021.11.30.23.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 23:54:15 -0800 (PST) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Dec 2021 16:53:48 +0900 Message-Id: <20211201075348.3121186-13-hiroh@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211201075348.3121186-1-hiroh@chromium.org> References: <20211201075348.3121186-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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 Reviewed-by: Umang Jain --- src/android/camera_request.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/android/camera_request.h b/src/android/camera_request.h index 887dbe86..d9b04f16 100644 --- a/src/android/camera_request.h +++ b/src/android/camera_request.h @@ -57,7 +57,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,