Show a patch.

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

{
    "id": 3034,
    "url": "https://patchwork.libcamera.org/api/patches/3034/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3034/",
    "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": "<20200306231050.7986-1-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-06T23:10:50",
    "name": "[libcamera-devel] libcamera: v4l2_videodevice: Don't use std::atomic specialization",
    "commit_ref": "2cc90af8c7b6ac90b62ed9794d6176562b788292",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "51d1b1ee958f0eadd04cd67ed668b8625816c31a",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3034/mbox/",
    "series": [
        {
            "id": 706,
            "url": "https://patchwork.libcamera.org/api/series/706/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=706",
            "date": "2020-03-06T23:10:50",
            "name": "[libcamera-devel] libcamera: v4l2_videodevice: Don't use std::atomic specialization",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/706/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3034/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3034/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D86B60427\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Mar 2020 00:11:01 +0100 (CET)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8B91724B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Mar 2020 00:11:00 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1583536260;\n\tbh=bxEsOx/iKbU1H5CYPQ41exF+mbx+YABkQSzrPv4fTXs=;\n\th=From:To:Subject:Date:From;\n\tb=oYu2xOP4tDN/Tn0Cvoowmi4BvgOphgl27/7/NmqSC+tf67XkE5LEnjrOlTKKtE7GP\n\tvdJE9IkAAlkHDoh3om36UyWUnxfutk61h3CoGv60Ha73V6YobT2ZVzudM2UHNlDO7e\n\tAYdijoV3j8q7xoehNBjYMuU8F13oMvSNgjbLJMoU=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  7 Mar 2020 01:10:50 +0200",
        "Message-Id": "<20200306231050.7986-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't use\n\tstd::atomic specialization",
        "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>",
        "X-List-Received-Date": "Fri, 06 Mar 2020 23:11:01 -0000"
    },
    "content": "The std::atomic_uint64_t specialization was missing from C++14, and only\nadded to C++17 (see LWG 2441). It was treated as a Defect Report and\nbackported to earlier C++ standards by gcc and clang, but is missing\nfrom libstdc++ shipped with gcc 5 and gcc 6. Fix the compilation error\nby using std::atomic<uint64_t> instead.\n\nFixes: 4e0d1eca10b7 (\"libcamera: V4L2BufferCache: Improve cache eviction strategy\")\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/include/v4l2_videodevice.h | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h\nindex 04802012d531..d051c9060f09 100644\n--- a/src/libcamera/include/v4l2_videodevice.h\n+++ b/src/libcamera/include/v4l2_videodevice.h\n@@ -9,6 +9,7 @@\n \n #include <atomic>\n #include <memory>\n+#include <stdint.h>\n #include <string>\n #include <vector>\n \n@@ -142,7 +143,7 @@ private:\n \t\tstd::vector<Plane> planes_;\n \t};\n \n-\tstd::atomic_uint64_t lastUsedCounter_;\n+\tstd::atomic<uint64_t> lastUsedCounter_;\n \tstd::vector<Entry> cache_;\n \t/* \\todo Expose the miss counter through an instrumentation API. */\n \tunsigned int missCounter_;\n",
    "prefixes": [
        "libcamera-devel"
    ]
}