Show a patch.

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

{
    "id": 19394,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19394/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19394/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20240113142218.28063-6-hdegoede@redhat.com>",
    "date": "2024-01-13T14:22:05",
    "name": "[libcamera-devel,v2,05/18] libcamera: internal: Document the SharedMemObject class",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d2782323f7457a27e6fcf59b72eed7dcf458a157",
    "submitter": {
        "id": 102,
        "url": "https://patchwork.libcamera.org/api/1.1/people/102/?format=api",
        "name": "Hans de Goede",
        "email": "hdegoede@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19394/mbox/",
    "series": [
        {
            "id": 4142,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4142/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4142",
            "date": "2024-01-13T14:22:00",
            "name": "[libcamera-devel,v2,01/18] libcamera: pipeline: simple: fix size adjustment in validate()",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4142/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19394/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19394/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 2074DC32BC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 13 Jan 2024 14:22:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 927A5628BF;\n\tSat, 13 Jan 2024 15:22:44 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 05FD0628B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Jan 2024 15:22:41 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-601-594lwOrdMayC1xqNKFoBUg-1; Sat, 13 Jan 2024 09:22:38 -0500",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1306D85A588;\n\tSat, 13 Jan 2024 14:22:38 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.39.192.58])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 27DE13C25;\n\tSat, 13 Jan 2024 14:22:36 +0000 (UTC)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705155764;\n\tbh=fBzL2s5oxRsGrkzd2/fc8S9Z2CN3n1c7m6lC/Zmfzww=;\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=P1xx3LySYzNOFBkw65caZTCb4gNCqs7y1IG0u5OGNIXd3q0D+YZ37uz7z6hgDSfoG\n\t1pZthS7ohRZMlL9dtWo3oVaM+XUrUE7AAVwNz8F5K1Y2vPSxeYr0EL2fEpxFjo6RC8\n\txpI2B5t+fxH0+nFPyje1cFngEqfu3/Z5+laTdKLUrjWDuQ5kyFUBZep8I+swnIF92b\n\tBxLCi/wJfbchZKwwSuQXAGpLcbVo+TI21KIaqkzQBZx2uCTfiUmDeVQ5is9/as3Y/p\n\tFJkkKMvmL0DZiQBvxiFlO9M1GomhQVdnc2FfiZsX/RRTHX6PAC6wUmGrPUNwuYsi17\n\t5hnthXK8XuVCw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1705155760;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=H1oIVgkw6WX1+fpLPBZklA9UQJyKLouaD0z3IEBI+IY=;\n\tb=DJObr7HE0I4kK5KPZeXGsmKVhogf965Adv5z+tuh4wUbr29viWORR9S+Q2QXZIfV7FBtxl\n\tpJqIvnJ2XlUS56F3PbixhRu7o5fVn1iOyzH2oSStGAYKXRGOxUSl6aOPdFgvYQtGd0uJsw\n\t6npSForzMak9A8w4fkfr++Se6l/taac="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"DJObr7HE\"; \n\tdkim-atps=neutral",
        "X-MC-Unique": "594lwOrdMayC1xqNKFoBUg-1",
        "To": "libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov.ynk@gmail.com>",
        "Date": "Sat, 13 Jan 2024 15:22:05 +0100",
        "Message-ID": "<20240113142218.28063-6-hdegoede@redhat.com>",
        "In-Reply-To": "<20240113142218.28063-1-hdegoede@redhat.com>",
        "References": "<20240113142218.28063-1-hdegoede@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "Subject": "[libcamera-devel] [PATCH v2 05/18] libcamera: internal: Document\n\tthe SharedMemObject class",
        "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": "Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Hans de Goede <hdegoede@redhat.com>",
        "Cc": "Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tPavel Machek <pavel@ucw.cz>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>, admin@dennisbonke.com",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Dennis Bonke <admin@dennisbonke.com>\n\nDocument the SharedMemObject class.\n\nSigned-off-by: Dennis Bonke <admin@dennisbonke.com>\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\nTested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp Lenovo x13s\nTested-by: Pavel Machek <pavel@ucw.cz>\n---\n .../libcamera/internal/shared_mem_object.h    | 53 +++++++++++++++++++\n 1 file changed, 53 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h\nindex bfb639ee..e862ce48 100644\n--- a/include/libcamera/internal/shared_mem_object.h\n+++ b/include/libcamera/internal/shared_mem_object.h\n@@ -19,10 +19,20 @@\n \n namespace libcamera {\n \n+/**\n+ * \\class SharedMemObject\n+ * \\brief Helper class for shared memory allocations.\n+ *\n+ * Takes a template T which is used to indicate the\n+ * data type of the object stored.\n+ */\n template<class T>\n class SharedMemObject\n {\n public:\n+\t/**\n+\t * \\brief The size of the object that is going to be stored here.\n+\t */\n \tstatic constexpr std::size_t SIZE = sizeof(T);\n \n \tSharedMemObject()\n@@ -30,6 +40,11 @@ public:\n \t{\n \t}\n \n+\t/**\n+\t * \\brief Contstructor for the SharedMemObject.\n+\t * \\param[in] name The requested name.\n+\t * \\param[in] args Any additional args.\n+\t */\n \ttemplate<class... Args>\n \tSharedMemObject(const std::string &name, Args &&...args)\n \t\t: name_(name), obj_(nullptr)\n@@ -57,6 +72,10 @@ public:\n \t\tobj_ = new (mem) T(std::forward<Args>(args)...);\n \t}\n \n+\t/**\n+\t * \\brief Move constructor for SharedMemObject.\n+\t * \\param[in] rhs The object to move.\n+\t */\n \tSharedMemObject(SharedMemObject<T> &&rhs)\n \t{\n \t\tthis->name_ = std::move(rhs.name_);\n@@ -76,6 +95,10 @@ public:\n \t/* Make SharedMemObject non-copyable for now. */\n \tLIBCAMERA_DISABLE_COPY(SharedMemObject)\n \n+\t/**\n+\t * \\brief Operator= for SharedMemObject.\n+\t * \\param[in] rhs The SharedMemObject object to take the data from.\n+\t */\n \tSharedMemObject<T> &operator=(SharedMemObject<T> &&rhs)\n \t{\n \t\tthis->name_ = std::move(rhs.name_);\n@@ -85,31 +108,61 @@ public:\n \t\treturn *this;\n \t}\n \n+\t/**\n+\t * \\brief Operator-> for SharedMemObject.\n+\t *\n+\t * \\return the object.\n+\t */\n \tT *operator->()\n \t{\n \t\treturn obj_;\n \t}\n \n+\t/**\n+\t * \\brief Operator-> for SharedMemObject.\n+\t *\n+\t * \\return the object.\n+\t */\n \tconst T *operator->() const\n \t{\n \t\treturn obj_;\n \t}\n \n+\t/**\n+\t * \\brief Operator* for SharedMemObject.\n+\t *\n+\t * \\return the object.\n+\t */\n \tT &operator*()\n \t{\n \t\treturn *obj_;\n \t}\n \n+\t/**\n+\t * \\brief Operator* for SharedMemObject.\n+\t *\n+\t * \\return the object.\n+\t */\n \tconst T &operator*() const\n \t{\n \t\treturn *obj_;\n \t}\n \n+\t/**\n+\t * \\brief Gets the file descriptor for the underlaying storage file.\n+\t *\n+\t * \\return the file descriptor.\n+\t */\n \tconst SharedFD &fd() const\n \t{\n \t\treturn fd_;\n \t}\n \n+\t/**\n+\t * \\brief Operator bool() for SharedMemObject.\n+\t *\n+\t * \\return true if the object is not null, false otherwise.\n+\t */\n \texplicit operator bool() const\n \t{\n \t\treturn !!obj_;\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "05/18"
    ]
}