From patchwork Wed Dec 1 07:53:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 14947 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 AF4A4BF415 for ; Wed, 1 Dec 2021 07:54:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6EA5D60723; Wed, 1 Dec 2021 08:54:10 +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="F4B8YGqw"; dkim-atps=neutral Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 58B3F60724 for ; Wed, 1 Dec 2021 08:54:08 +0100 (CET) Received: by mail-pl1-x634.google.com with SMTP id o14so17040048plg.5 for ; Tue, 30 Nov 2021 23:54:08 -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=F4B8YGqw2F26pQG50le1AIsGG53ZUpOqfteIA66HcQnxv0wfnWut6v9AFyWE3FNnpZ NINe7ApTKli56zce5j/UK9bhtQfs3MPF5w0aMjupQAaCScKeCyqFcRlAKZAL4q08ESWC pubiS8bWgXjQlMSiDuYaGUXWvJWhDPZEzIx3o= 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=rzlmjRR2Iub5ogZp3UzTKaP5fZQq5TjGZKRWrCa43eyqCHWqhOHwhEEtGngXLmHKGN CQfMMlCTtpgl5rmkw2jSDLHj1bRU9zFnq6qax82MfGB7mXDD9FxTfWr6A+7LfB+FfgRT uCPjY/mxjoVFfkuyoTqBaIl0yT2BQgzb/w5GXZM3H5NeLH8w2bcEAfFC3xTHv85/Z/Oa ZyMvSMbtk9myZZaxDO8uV/KqNmTpgPSA1+RBM3wlQkO3kldoE1Ww4CkK/TG7QPsbEJfU jr7FWgcgkjIQ4cjwlAmw8+RugC77QvolPNr8HTBBxSth1t8fVX76eB23VOAqfhcMgHx4 SZvA== X-Gm-Message-State: AOAM532+5hlPQaHMrJuUnPRvQQgCPhG2XF+O+yQVN6ljvB2D2RLb2u2F yYByFbV1lZFaeX0Z75DeoCrF9BXQ8sWHhA== X-Google-Smtp-Source: ABdhPJxH6Quf09cAe8T168/0LYPZ5MVLKlJpyUcKeKmNQFfrZpgRadwXQ/tAyEQ6e5kx2MQaMKILGg== X-Received: by 2002:a17:90a:d481:: with SMTP id s1mr5405915pju.66.1638345246747; Tue, 30 Nov 2021 23:54:06 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 23:54:06 -0800 (PST) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Dec 2021 16:53:43 +0900 Message-Id: <20211201075348.3121186-8-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 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_;