Patch Detail
Show a patch.
GET /api/patches/17693/?format=api
{ "id": 17693, "url": "https://patchwork.libcamera.org/api/patches/17693/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17693/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20221027055515.321791-3-nicholas@rothemail.net>", "date": "2022-10-27T05:55:07", "name": "[libcamera-devel,02/10] ipa: add missing thread-safety annotations", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "be333057b7218ae3f599e181a7a22692226e737e", "submitter": { "id": 97, "url": "https://patchwork.libcamera.org/api/people/97/?format=api", "name": "Nicolas Dufresne via libcamera-devel", "email": "libcamera-devel@lists.libcamera.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17693/mbox/", "series": [ { "id": 3579, "url": "https://patchwork.libcamera.org/api/series/3579/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3579", "date": "2022-10-27T05:55:08", "name": "[libcamera-devel,01/10] ipa: workaround libcxx duration limitation", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3579/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17693/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17693/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 9F043C3285\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Oct 2022 05:55:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B91A762F80;\n\tThu, 27 Oct 2022 07:55:28 +0200 (CEST)", "from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com\n\t[IPv6:2001:4860:4864:20::2c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C41F962F6B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 07:55:24 +0200 (CEST)", "by mail-oa1-x2c.google.com with SMTP id\n\t586e51a60fabf-13ae8117023so660858fac.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Oct 2022 22:55:24 -0700 (PDT)", "from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:6406:fc7a:e46d:1666])\n\tby smtp.gmail.com with ESMTPSA id\n\t9-20020a9d0c09000000b00661a05691fasm140021otr.79.2022.10.26.22.55.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Oct 2022 22:55:23 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666850128;\n\tbh=17Ukq0I3hqoas+gx0WV6KuuhC12XYREv+g1mUc9xNoQ=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=quU7Qa0F8NHbKQWFL1cLWGXBezMQLTDVFH3ddhnsuXXsTIEJ2ZBDCFGbcWDaG6neh\n\tHQoDRhZ5dLxBKXIqFcbBP4NrVrDdnJ38Mm7Ccr3oa0p7U2rId0umhe1rUuXNYVquSG\n\tOIqrjjelyNAX1pNiX/wGJBt0TufmDK6+MmxZHP8BZO9NFnHopwbpgAnSKS2OSaIGWP\n\teYKjWUOlq+SUwG74xgCt4NplfvEWjfY9bah+FSLfZiLHP6JVAhPzwKBtqtSo2mvaqZ\n\tI4YSbq2w0Oscpx85eu56CJ00+65QoK/FYk25GvDIcbIGek8wVIkDyN518xm49Z9v8M\n\tMIDk5ezUins2Q==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rothemail-net.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=1mfxtU8lTzXIpkx/hUjfyntGA0NGDWGeGZDezQGJzxA=;\n\tb=Bf4GV9xG/qrz8/23P//8aPQlcFELp8dRWUEFC2JvZDeXacbtfIP54cT8aMjZNXcFkF\n\tufMRHfYPqaNWHvZTKEJDFgkTG6rn9rwnSaAutE0liLsYNkHwUXgV2e4QcaSI0FctZqmW\n\tIqUbmuaktmJyTXe9LnJK5rOjEPvlpetraSHiCw9F+2jOSJGk0BqPtHYKebOiTulXZcOQ\n\t6Sd0CSPTtmpLkglI16OBPlPRm+Z9Hsta7PvomQRYVSrcXtjr3TGf7Sk8bd4KswxQ+kCU\n\t98QyiG80kClWJUhxTJeysbTu3Z+olNnlqsyYoc+c3/cG6ttd2zAAsR+5EfmwAp6rezc7\n\tPXeA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=rothemail-net.20210112.gappssmtp.com\n\theader.i=@rothemail-net.20210112.gappssmtp.com header.b=\"Bf4GV9xG\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=1mfxtU8lTzXIpkx/hUjfyntGA0NGDWGeGZDezQGJzxA=;\n\tb=xZQQ1y6PcEIVdauVCgo68rloeCZzuOdmfOibJNm8yguHt0JURKnB90XXqzgdKVw4G9\n\tGVmXohQ7XM1ZzDAacFUGV5bYJJUWB5+UMGUyTN3QmfOm7sc0S79zoLzbprJmMb2KGwSx\n\tGekh8NNEQwfZPpmXtf8W+Htb0uhZNdig5DylArQARj3hhzwvdszFd4xD25jTUfanFg3l\n\tINLXpePY+zMV3QGE7aM6iLPnYESmukGu8coZqfEXSjcy8vk9AjRAB1+4Y4vkrFB6gIXC\n\tAk7wN8SNyluEplSWlodAb2I+rpilPmlx/H178EyDjcmOd1JcqvOs/yn1x3J61h+47SCK\n\t4p5w==", "X-Gm-Message-State": "ACrzQf231/UHL7zIlpJlMefJW5G9MmTpbGhVhpDBllLbg4/1DuL1oCrv\n\tmbRwd9YwrGi5bXvbip1Wr/5C5sNeBs4UDmy+", "X-Google-Smtp-Source": "AMsMyM6qLiY3YRUr5+42z1PnYxpzwgVtlWGuTOKYn2cXSSxea6AAOsZ6rZCFXbarOQYczA86m72wMQ==", "X-Received": "by 2002:a05:6870:14cc:b0:132:8901:7cb3 with SMTP id\n\tl12-20020a05687014cc00b0013289017cb3mr4539871oab.21.1666850123360; \n\tWed, 26 Oct 2022 22:55:23 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 27 Oct 2022 00:55:07 -0500", "Message-Id": "<20221027055515.321791-3-nicholas@rothemail.net>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20221027055515.321791-1-nicholas@rothemail.net>", "References": "<libcamera Android Enhancements>\n\t<20221027055515.321791-1-nicholas@rothemail.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 02/10] ipa: add missing thread-safety\n\tannotations", "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>", "From": "Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "libcamera-devel@lists.libcamera.org", "Cc": "nicholas@rothemail.net", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Nicholas Roth <nicholas@rothemail.net>\n\nThe raspberrypi IPA is missing thread-safety annotations, which breaks\nthe build.\n\nAdd required thread-safety annotations.\n\n../src/ipa/raspberrypi/controller/metadata.h:108:31: error: mutex\n 'mutex_' is still held at the end of function [-Werror,-Wthread-safety-analysis]\n void lock() { mutex_.lock(); }\n ^\n../src/ipa/raspberrypi/controller/metadata.h:108:23: note: mutex\n acquired here\n void lock() { mutex_.lock(); }\n ^\n../src/ipa/raspberrypi/controller/metadata.h:109:25: error: releasing\n mutex 'mutex_' that was not held [-Werror,-Wthread-safety-analysis]\n void unlock() { mutex_.unlock(); }\n ^\n\nSigned-off-by: Nicholas Roth <nicholas@rothemail.net>\n---\n src/ipa/raspberrypi/controller/metadata.h | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/controller/metadata.h b/src/ipa/raspberrypi/controller/metadata.h\nindex 0f7ebfaf..870b6e26 100644\n--- a/src/ipa/raspberrypi/controller/metadata.h\n+++ b/src/ipa/raspberrypi/controller/metadata.h\n@@ -13,9 +13,11 @@\n #include <mutex>\n #include <string>\n \n+#include <libcamera/base/thread_annotations.h>\n+\n namespace RPiController {\n \n-class Metadata\n+class LIBCAMERA_TSA_CAPABILITY(\"mutex\") Metadata\n {\n public:\n \tMetadata() = default;\n@@ -103,8 +105,8 @@ public:\n \t * locks with the standard lock classes.\n \t * e.g. std::lock_guard<RPiController::Metadata> lock(metadata)\n \t */\n-\tvoid lock() { mutex_.lock(); }\n-\tvoid unlock() { mutex_.unlock(); }\n+\tvoid lock() LIBCAMERA_TSA_ACQUIRE() { mutex_.lock(); }\n+\tvoid unlock() LIBCAMERA_TSA_RELEASE() { mutex_.unlock(); }\n \n private:\n \tmutable std::mutex mutex_;\n", "prefixes": [ "libcamera-devel", "02/10" ] }