{"id":27243,"url":"https://patchwork.libcamera.org/api/1.1/patches/27243/?format=json","web_url":"https://patchwork.libcamera.org/patch/27243/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260706110120.2509826-7-bryan.odonoghue@linaro.org>","date":"2026-07-06T11:01:19","name":"[v4,6/7] libcamera: base: shared_fd: Add hash template","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"cb4cd2864f6e5a94832b1c573261d0c5bb3ae8cb","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/27243/mbox/","series":[{"id":6040,"url":"https://patchwork.libcamera.org/api/1.1/series/6040/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6040","date":"2026-07-06T11:01:13","name":"libcamera: software_isp: gpu: Add go faster stripes","version":4,"mbox":"https://patchwork.libcamera.org/series/6040/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27243/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27243/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 03F10C330F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:01:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B14766033;\n\tMon,  6 Jul 2026 13:01:40 +0200 (CEST)","from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 959106600A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:01:36 +0200 (CEST)","by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-493ce08a75bso11843845e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Jul 2026 04:01:36 -0700 (PDT)","from inspiron14p-linux ([109.77.44.220])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-47aa0960634sm25190846f8f.26.2026.07.06.04.01.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 06 Jul 2026 04:01:35 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"gnLOmaGz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1783335696; x=1783940496;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=iBRWJUBS/Uq8NB/fn6jxhZu1bX+RaDP4LLlVacS3Kt8=;\n\tb=gnLOmaGzWzRQ87zJ2YLDGOctGXtRC3h28pOtxPgCrhuZbnkG9PRBKdyPD+8+GzpvQ5\n\tbx1yxdhFojmu8Pnag8ATm8PZJYzl2HMl/LF5yg/GrYiMMg6txLYqwdkIP7zFE32thzNG\n\tp4CKhoo5tIaPujGT+WQvRlvLwwtNZCtlT16bUjZj7BfzkN8K4e3h3RtFbNkqvD0Hq/BA\n\twygopG28onD7OlwwwN6n3RBtcndxYmfmFP7WArsSyvCENmMv08y8gnR1hFtn637swbNO\n\tCzslz63vN7dViTwJkMdjfZ3pGu4KpeA8Xui2SWu/0gsyejwyGiyXCCe1P8KWVKltB5b1\n\tQ/jw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783335696; x=1783940496;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=iBRWJUBS/Uq8NB/fn6jxhZu1bX+RaDP4LLlVacS3Kt8=;\n\tb=g/2YaqQwueqxJkYIGRoqcK7sZOseosEeiX5aXd1CgiTs/YxxSKSt+PS7STw4wn4hfJ\n\tBjJr/gES2wGPlV3Q5+EC53nQYGKXq8dG2vG0yWFTRjZ+bxonO92qKn+NJJlutybOqYId\n\tC6wVDW5c4rX06BxXbaJD3T28tplQMAQGXh5dYDkmdu/rzw1/DJP0Y69X+bSf2eajsjsG\n\t3fdWhqvmP38zXIZXJmUh2kKmt8Jb/wGPllxl+5f8sIjV+ZS0wJWJFcJd1p1mlVEKAuUQ\n\tpFaAuuawxVbOQPKb6J72vXtEffhOTw1qbu4qbxto0o20MDaoEu+wpswsFqiL0Evmvmkt\n\tKU7Q==","X-Gm-Message-State":"AOJu0Yw6iN/+Ctkku192X2DbgqJv131UbwFNdG5apGjB3JhFka+8o4vY\n\tAOZEEJMJ2ygAjI3abugwMnqPmAW7uaWpvGt3bRWBsd8M+8X0I4M3B383fw0DOSnTxvbDoDBa45/\n\tomKtZ","X-Gm-Gg":"AfdE7ckTeveeXkbo+oTP+mm7zfCOqRM3c52tXniljOpZ/0fZFyQt+NZzPlM8VHcb+7v\n\terZXFX9aUaKJ6TE6sE8s3n65vfoRMkQlJ87CZGTDDMpI3Ii70yKgCvF1fCUof+E2fGbnRa0wgHq\n\tJAZMY14x8NUEuqWKOg/jp/Yn3u54ZWYfH3YfLwnHTVvpTS3FiIelavfQ+aLR5OglpzncmudrhYU\n\tud7lkQasBX9iMs8OcexzR9cQnDhvZOkNa+dMcsxcdz+3pH8a/J8qKK39Uh63Do4qYACI0eN1IdR\n\ta9xqvOFzphSpPhCmgUY6QpvdKp8l81vLFD878jezVVvn1yfcfFcDd2voff6Gznsa02YD93c6UGx\n\t2wO1PZ0dnnbMULb38yRSIUK+92RxrD5BI/QT4tbiQxVnTmzi3D/PqVDgAwLNO/jva6o8sqhK9iw\n\tSakXYO3i0C6SXdCZbTU8oUwirC3XiO","X-Received":"by 2002:a05:600c:3b10:b0:492:3e44:214b with SMTP id\n\t5b1f17b1804b1-493d11d7373mr109945035e9.13.1783335696148; \n\tMon, 06 Jul 2026 04:01:36 -0700 (PDT)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"bryan.odonoghue@linaro.org, pavel@ucw.cz, Robert Mader\n\t<robert.mader@collabora.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","Subject":"[PATCH v4 6/7] libcamera: base: shared_fd: Add hash template","Date":"Mon,  6 Jul 2026 12:01:19 +0100","Message-ID":"<20260706110120.2509826-7-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260706110120.2509826-1-bryan.odonoghue@linaro.org>","References":"<20260706110120.2509826-1-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Robert Mader <robert.mader@collabora.com>\n\nSuggested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nSigned-off-by: Robert Mader <robert.mader@collabora.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n Documentation/Doxyfile-common.in   | 2 ++\n include/libcamera/base/shared_fd.h | 9 +++++++++\n 2 files changed, 11 insertions(+)","diff":"diff --git a/Documentation/Doxyfile-common.in b/Documentation/Doxyfile-common.in\nindex f11ec593d..c0696496c 100644\n--- a/Documentation/Doxyfile-common.in\n+++ b/Documentation/Doxyfile-common.in\n@@ -75,3 +75,5 @@ PREDEFINED             = __DOXYGEN__ \\\n \t\t\t @PREDEFINED@\n \n HAVE_DOT               = YES\n+\n+BUILTIN_STL_SUPPORT    = YES\ndiff --git a/include/libcamera/base/shared_fd.h b/include/libcamera/base/shared_fd.h\nindex 61fe11c1d..65b1044c7 100644\n--- a/include/libcamera/base/shared_fd.h\n+++ b/include/libcamera/base/shared_fd.h\n@@ -7,6 +7,7 @@\n \n #pragma once\n \n+#include <functional>\n #include <memory>\n \n namespace libcamera {\n@@ -57,3 +58,11 @@ static inline bool operator!=(const SharedFD &lhs, const SharedFD &rhs)\n }\n \n } /* namespace libcamera */\n+\n+template<>\n+struct std::hash<libcamera::SharedFD> : private std::hash<int> {\n+\tauto operator()(const libcamera::SharedFD &x) const noexcept\n+\t{\n+\t\treturn std::hash<int>::operator()(x.get());\n+\t}\n+};\n","prefixes":["v4","6/7"]}