From patchwork Fri Apr 16 10:31:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11964 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 88064BD235 for ; Fri, 16 Apr 2021 10:31:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 468A168819; Fri, 16 Apr 2021 12:31:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="fSTDztR3"; dkim-atps=neutral Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7FB5B68814 for ; Fri, 16 Apr 2021 12:31:55 +0200 (CEST) Received: by mail-wr1-x42f.google.com with SMTP id w4so22456955wrt.5 for ; Fri, 16 Apr 2021 03:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E2909hUKhOJpeDmhJhRQ5nfBf507ZwC33RPXgoGMKzw=; b=fSTDztR3gQnZ5kG2JXIEfV4J/40W+AsMUtV2DqVEcWvG9ppVwtmF4aLB5pTpZ48uD7 664LZ2ZWXC/z8DdBsYS9WmUaROtVvAkJtVvY4r61WPGkcDRgjWYaZ7UeTM92lxX4+YVy YswhCu550FVfCVaEIQy8Wmm+RNumyZiZUbXpT2xlUQ4MGcEVNwlxDV9KYP9n2zKxhQti mZIZeNW5PEcgcY7SnWH7MeLW4+QmXbY4VqwyqOmjj15rxVztE3nxdV/ezfUDSjYTY4yo RN9UiO+kDvw0wAvhKXZXlOrgz5wV2YURSBBGPVzKZQiondfsst2rVpyBsEHLcfRdgiyJ U/Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E2909hUKhOJpeDmhJhRQ5nfBf507ZwC33RPXgoGMKzw=; b=D9oNTonhGRMA0lORVqJA1sRkM2wQxUQWwxMdZVJy8WuJ9jOVBgoOXFBmsOly+7/Ii4 qTuh9mDe7KdYVDOd6f1GbFo3akUt3X9C81MZM2ogSXRHPj1HvJ2Uw1QFZNZiesKnZ2VE qLYfFmJUDzJj7J6XI0n9jt8+fFmHfJCHCG4A5dCanLWvaAE+Tqd+SYFW0DrtH/pUcHJH c/60gsQpk/paD2MKwqdYQGfNSM4iCMWVe1mAZ244szxp50hVSpE5X7sy59DA8hXh/uqN XTjVkGNCckm20/jf9V3UmudIz3iNA1eC23FoY4m7HdlfTrZ7vUbFPXcgQIMQH0l/keH6 wv0g== X-Gm-Message-State: AOAM531mBTQ+c9UL+Z2fju54H7kjArgCEtg+0xURxWdSlwFRybEs+j7B jPk1TO7vSDd8tWaLMRV9uO5HnmPbowDf4g== X-Google-Smtp-Source: ABdhPJwW7i67O5XqtaFIpCaaGUW9iNK4/om0UFUrBp7a7s/C83ahQ9TLmbiHWt+mMOeaJzQR6sfNQw== X-Received: by 2002:a5d:4287:: with SMTP id k7mr8781980wrq.244.1618569114973; Fri, 16 Apr 2021 03:31:54 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:15:4af5:8d45:b5d1:889d]) by smtp.gmail.com with ESMTPSA id d133sm8234500wmf.9.2021.04.16.03.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 03:31:54 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 16 Apr 2021 11:31:40 +0100 Message-Id: <20210416103141.1483745-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210416103141.1483745-1-naush@raspberrypi.com> References: <20210416103141.1483745-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/3] ipa: raspberrypi: Add move operator 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add the move operator implementation for the RPiController::Metadata class. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman --- src/ipa/raspberrypi/controller/metadata.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ipa/raspberrypi/controller/metadata.hpp b/src/ipa/raspberrypi/controller/metadata.hpp index 4f44ffc6771c..c55194040f2f 100644 --- a/src/ipa/raspberrypi/controller/metadata.hpp +++ b/src/ipa/raspberrypi/controller/metadata.hpp @@ -45,6 +45,14 @@ public: data_ = other.data_; return *this; } + Metadata &operator=(Metadata &&other) + { + std::lock_guard lock(mutex_); + std::lock_guard other_lock(other.mutex_); + data_ = std::move(other.data_); + other.data_.clear(); + return *this; + } template T *GetLocked(std::string const &tag) { // This allows in-place access to the Metadata contents,