Show a patch.

GET /api/patches/17703/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17703,
    "url": "https://patchwork.libcamera.org/api/patches/17703/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17703/",
    "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": "<20221027224135.348115-3-nicholas@rothemail.net>",
    "date": "2022-10-27T22:41:27",
    "name": "[libcamera-devel,v4,02/10] ipa: add missing thread-safety annotations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/17703/mbox/",
    "series": [
        {
            "id": 3581,
            "url": "https://patchwork.libcamera.org/api/series/3581/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3581",
            "date": "2022-10-27T22:41:26",
            "name": "[libcamera-devel,v4,01/10] ipa: workaround libcxx duration limitation",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/3581/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17703/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17703/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 0E386BDB16\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Oct 2022 22:41:48 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3626362FB8;\n\tFri, 28 Oct 2022 00:41:47 +0200 (CEST)",
            "from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com\n\t[IPv6:2001:4860:4864:20::2e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D82662FA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Oct 2022 00:41:43 +0200 (CEST)",
            "by mail-oa1-x2e.google.com with SMTP id\n\t586e51a60fabf-13bef14ea06so4322320fac.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 15:41:42 -0700 (PDT)",
            "from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:6a4b:7aa7:dda2:75cb])\n\tby smtp.gmail.com with ESMTPSA id\n\tr20-20020a056830419400b006619533d1ddsm976825otu.76.2022.10.27.15.41.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 27 Oct 2022 15:41:41 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666910507;\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=TGffDJ2cd8n2aqPuGY6/IdD2lVSIkc2KYoKyUQWkzkKjxb6L6aKdC2U7HVLn7+v79\n\tMqPEUqMmVRNMTQPGHoNdUy/DgEHSZ79/g+n60yBSW051riiJlB/5C9HZuu/3Zpa0p8\n\tBYaOrQ92YbZjsL+wBU9/+NGOJ7azBEnf4CU6nFLeBTFdcwgh+bdmvKOh2Zg0besW1d\n\tUt5W2izVFZLqI+ZADbS/eGpx8ANQiBBzWf7zE583p67Zu/Ovnw3KxmcRORST84E7JP\n\tFETCAeKAR82nja5zfV1CpkJZxu0om56rWK/qb8Gp8WTudHrym3ki1zQMPAVdmeH+JS\n\ti0Wu1WgrFx67A==",
            "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=c9iPnv3WYXQFSPA33nYoivkAtOyZkZjHh4QDF3SqBgaiWbkSJYjQO9pUxPSTcUajy0\n\tx44adP9J4+xaHSskrIcSKJUwqgeI3caZ3EN60s7bIGI/tEbq34V4hMs+6QJw7D1shISC\n\tKIBpCCu0CzuJ9gKsAfpacaoPRKWLI0Fxd4vdO1qbeAI4XbOr0XsdKkrnV1PE24axXvt8\n\tMCiA2GEuI5y2E7adMZ/nIXMTYEhE3yx0USZbN8b+AGX9J3+zZCDFPAhnLZwJiOGDnTbh\n\tDOtb+IX4qLZD0kaTqBWEWnnBDbbf8UE8SvKGZpnXv6a1Iivi8aJvU0VWHyu4AbNR/dBG\n\teAzA=="
        ],
        "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=\"c9iPnv3W\"; \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=4JpUKoUQhMyEB5/x3K7mVBo5zwJU8602IMM5PfIueCxW49v4jm0vbK1qKfyJfDf8sL\n\tzvK5bWfPRMCb1zD0bH6LliFV6vQ6dgVFmQcSvDmeCEObzjpdmR5rxQjXCsiMP7J0dbNv\n\tSIuLAB+UwxbWruV7l05xPtreDrNwWLmOis7N451iWcGpCpRfrET6hDJq1ICKBlK+6yIL\n\tgYqdqtDWUY2Ajn97HIJbdDlL8l+HQz5Q+QCojb/ZwxBA3oWa3k6dvSeFvTb5sos6iFvj\n\tBes/PrFypS884Hp4baiIaDnLEUxwhXN94xoYLcKKAoVY9F1fq38bsqJDzMbZutZLnX9l\n\tG6Rg==",
        "X-Gm-Message-State": "ACrzQf20IUuxM2REwZNi8KFAcxcVApeVOylkzh1ZBnd0QjFTndZGmn4c\n\tesT+tycF5o8Rj/S+NpFc69qew99LElYGg6hw",
        "X-Google-Smtp-Source": "AMsMyM6gmCMXwHt27z0L480YZF3uBN9Ce4tj/vVy8c1PECe9cHcGcXYeiZc25YvkFRbcZmnaqgRI0w==",
        "X-Received": "by 2002:a05:6871:1d3:b0:136:b0e6:de65 with SMTP id\n\tq19-20020a05687101d300b00136b0e6de65mr7169331oad.41.1666910501524; \n\tThu, 27 Oct 2022 15:41:41 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 27 Oct 2022 17:41:27 -0500",
        "Message-Id": "<20221027224135.348115-3-nicholas@rothemail.net>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221027224135.348115-1-nicholas@rothemail.net>",
        "References": "<20221027224135.348115-1-nicholas@rothemail.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 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",
        "v4",
        "02/10"
    ]
}