From patchwork Fri Oct 6 13:19:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19108 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 E72C7C32B9 for ; Fri, 6 Oct 2023 13:20:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9CAA762975; Fri, 6 Oct 2023 15:20:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1696598405; bh=DFKrCrwQ1PQoIr32/ygh049wwrQ4Ec1bObBwxcYMe4U=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ajNrQ42QGM8jDBoSo5LixWsy7IcoMjc4cWpFlfF+W22yxyeDBskfj1xXG/FMu4c+H EZjYvTQ34J9WbX7OPXWQ1IHWPVD6s+InsjDfz0/Fe9RmJs7fYtkaeemhLmfvdPJRC9 6dQ4/OXGGZHig5Dn8yIpkGlmkBXuVUKOzV1szjLbJmozsSa54LDRfkXTUxMZqERrN1 Cz/BTBsDEXU7uIZPTOSqH6gjC7IxY9jyPbLyYJvLh1XF2VyX9HspI88H6tyw1nWaHJ NHC/lrynTrXSayO0p4ZglT82TqOPoGFMaAMi+s6mH34FRAGI9MJex1GAOEspAiCIDT mNNW9Fn1HQa8g== Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 987CB62971 for ; Fri, 6 Oct 2023 15:20:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="cOTGRfeR"; dkim-atps=neutral Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-313e742a787so1313650f8f.1 for ; Fri, 06 Oct 2023 06:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1696598403; x=1697203203; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YMiXqTq3vID1L3qbUHsEuUNfPfLpxttUS2JIGfVVgfA=; b=cOTGRfeRv9NTgwnWejSOUHcRk3viF7av/iTwG5EJ6zL4UFri2eqyPOHRBp9DhahQO/ rtvenD/R76srCBi0FOHWnXej3/6Bc/yxDqGNnHc1yBh2dyhRGe+9z11n/piVBmdQWM8f 3qslOqYLb2YMkJNsx19SwFOsL+LtIvuetWlw5z/xi5ShqzZM/mgTsJAECMKl731QW3H4 QUolzNIRr+5CZyBksE3I58aQG6U3HOPpuIBE0wLtV08U6JPysDCpqzhwnQJrbbcPFDbS dm4UawDaWeSB7DLS+m10TEbN1j8aPsZC40nVE5Jpdu7sDR9PoXyOHSb7l0huDupJ0JwT 3OtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696598403; x=1697203203; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YMiXqTq3vID1L3qbUHsEuUNfPfLpxttUS2JIGfVVgfA=; b=G3FUAQjPQwHnP655vteu2771JjWGfsHDHn6AvSD7F57t18vcbe7ZYbqR4ZkyDlGfTb xWiG/X6TrhrqkTzs6RAOkjkUWfKZZpCtPC0rfu36c9rH3+2LKEDFCQo5y7QS4Z5DAJil KE/XElJ4FQjoj7CiIdUHoG52UhDiOcI0sS4hBrCWkTD/T2sRxoxOWGGyU3Iuo0KfsaY6 s9oyDGuzf83eZ7U11kLvW5O0ipVV58l43xLZcKmMx18wtgV3xUur1ZKr/Bog71Y4LNQV wnbD5FnbZSWWrhsaH1X5jzCjKOQWVLr8w5xLuMJ8mQrfWWxmXJ3Zofs/FrSrV2coK1ch pdLg== X-Gm-Message-State: AOJu0Yz4I1dNfiT8Qy3J01Oq3zQguBZHNHUWEqIss+GGmssrhe9PmAIS KvBCThnhR/cyPWyVZvk8cJb/qcuCbj3KgC3k3p01XQ== X-Google-Smtp-Source: AGHT+IHhiFdkBH/M6wxTgNn7/YfcJQXtkw5tNnScistmNpuFcL2Opkb0Wp7p30vq1eZvBq5qrZ6Iow== X-Received: by 2002:a5d:56c1:0:b0:31f:eb45:462e with SMTP id m1-20020a5d56c1000000b0031feb45462emr5205154wrw.28.1696598402849; Fri, 06 Oct 2023 06:20:02 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id m8-20020a056000180800b00321773bb933sm1639478wrh.77.2023.10.06.06.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 06:20:02 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 6 Oct 2023 14:19:46 +0100 Message-Id: <20231006132000.23504-7-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231006132000.23504-1-naush@raspberrypi.com> References: <20231006132000.23504-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 06/20] ipa: rpi: Add try_lock() to RPiController::Metadata 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: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add the missing try_lock() member function to RPiController::Metadata. This will allow RPiController::Metadata to be used as a template parameter in std::scoped_lock. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Jacopo Mondi --- src/ipa/rpi/controller/metadata.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ipa/rpi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h index bf8a2393457a..a232dcb12456 100644 --- a/src/ipa/rpi/controller/metadata.h +++ b/src/ipa/rpi/controller/metadata.h @@ -116,6 +116,7 @@ public: * e.g. std::lock_guard lock(metadata) */ void lock() LIBCAMERA_TSA_ACQUIRE() { mutex_.lock(); } + auto try_lock() LIBCAMERA_TSA_ACQUIRE() { return mutex_.try_lock(); } void unlock() LIBCAMERA_TSA_RELEASE() { mutex_.unlock(); } private: