From patchwork Wed Dec 1 07:07:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 14933 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 AD057C324F for ; Wed, 1 Dec 2021 07:07:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 583B760725; Wed, 1 Dec 2021 08:07:50 +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="B++QrKmb"; dkim-atps=neutral Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6657E6072E for ; Wed, 1 Dec 2021 08:07:48 +0100 (CET) Received: by mail-pf1-x432.google.com with SMTP id 8so23411477pfo.4 for ; Tue, 30 Nov 2021 23:07:48 -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=yfiTHE7WZmDZfQa0nPUIu56mr46Z/OnMWR39IqW4+bk=; b=B++QrKmbwh/n3+MYOLw/l5+RbHh2JYli/K5Z8O0Z53ck9Wa72Ym6zkZq4lZcAke2Rb CJeN1UqZg4ObotEhYmXqymUTb+4t6A7FkaWIgAhxRAvk2UvtazkwYXOMR7BRPyTBduqX sV81cOh6fjNbWaF/PKpUSmx4Jnkk1ePsLKEsI= 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=yfiTHE7WZmDZfQa0nPUIu56mr46Z/OnMWR39IqW4+bk=; b=asKIY/A8XJdpTnV/k27ESXw/iN5edsdyNX+UWL6mAjFlJDEbaormB2zNkSF5MD/xIs P/3imD6I8z2QeHo2+Fv7ylk532Nj4x/dVWT6Z8t4vvuUjfV+y0KNLTFz86GiY52ZVsVr vhs3vzJN4xXMGI2DRQaA5DaC2f4TuWgxZ0e1Xy0nEUtY9i2nAoIWC5Mt9pJPf/kldTD4 MDrxFUUo9w9RD+ib/ywt6/MNhow5iiyLFRrY7uLredwoHeGN8SAZlKMIRSS7V9RCwaTE ye+N9utEkshu5nabH36kDub1fzBYuPJL3fOGc59PexGbp4sdMASswKVctYRXApEFlt47 iZDQ== X-Gm-Message-State: AOAM5300ZUlKZzpWx+6VndlGhmavXxPDTfdOm5vPHrr4p0IGcZH1gRL3 PYaX7NPtyPiK9JchFQ9FX2t3t6IqM91GjQ== X-Google-Smtp-Source: ABdhPJzUz81gVE+/ViZRx3TsxxCzPAl/k53F0wDEmMEnb1WryEhCkxGgVWw5GthUsZpxI5dagcV8kg== X-Received: by 2002:a63:155f:: with SMTP id 31mr3358972pgv.156.1638342466735; Tue, 30 Nov 2021 23:07:46 -0800 (PST) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:3892:a049:59ba:c772]) by smtp.gmail.com with ESMTPSA id m10sm16598962pgv.75.2021.11.30.23.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 23:07:46 -0800 (PST) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Dec 2021 16:07:23 +0900 Message-Id: <20211201070728.3114247-8-hiroh@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211201070728.3114247-1-hiroh@chromium.org> References: <20211201070728.3114247-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 07/12] android: camera_hal_manager: 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 CameraHalManager. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/android/camera_hal_manager.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h index 765701b2..a5f8b933 100644 --- a/src/android/camera_hal_manager.h +++ b/src/android/camera_hal_manager.h @@ -53,14 +53,14 @@ private: void cameraAdded(std::shared_ptr cam); void cameraRemoved(std::shared_ptr cam); - CameraDevice *cameraDeviceFromHalId(unsigned int id); + CameraDevice *cameraDeviceFromHalId(unsigned int id) LIBCAMERA_TSA_REQUIRES(mutex_); std::unique_ptr cameraManager_; CameraHalConfig halConfig_; const camera_module_callbacks_t *callbacks_; - std::vector> cameras_; - std::map cameraIdsMap_; + std::vector> cameras_ LIBCAMERA_TSA_GUARDED_BY(mutex_); + std::map cameraIdsMap_ LIBCAMERA_TSA_GUARDED_BY(mutex_); libcamera::Mutex mutex_; unsigned int numInternalCameras_;