get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134618,
    "url": "http://patchwork.dpdk.org/api/patches/134618/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231127092502.18510-1-vodak@cesnet.cz/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20231127092502.18510-1-vodak@cesnet.cz>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231127092502.18510-1-vodak@cesnet.cz",
    "date": "2023-11-27T09:25:02",
    "name": "eal: introduce missing rte_thread wrappers",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2f49269c4b53a2cac611dc792290f6582ab6b795",
    "submitter": {
        "id": 3234,
        "url": "http://patchwork.dpdk.org/api/people/3234/?format=api",
        "name": "David Vodak",
        "email": "vodak@cesnet.cz"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231127092502.18510-1-vodak@cesnet.cz/mbox/",
    "series": [
        {
            "id": 30392,
            "url": "http://patchwork.dpdk.org/api/series/30392/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30392",
            "date": "2023-11-27T09:25:02",
            "name": "eal: introduce missing rte_thread wrappers",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/30392/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/134618/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/134618/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 62992433E3;\n\tMon, 27 Nov 2023 10:25:23 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D6BE040261;\n\tMon, 27 Nov 2023 10:25:22 +0100 (CET)",
            "from office2.cesnet.cz (office2.cesnet.cz [78.128.248.237])\n by mails.dpdk.org (Postfix) with ESMTP id 37ABB40150\n for <dev@dpdk.org>; Mon, 27 Nov 2023 10:25:21 +0100 (CET)",
            "from localhost.localdomain (unknown\n [IPv6:2001:67c:1220:80e:93:a24f:6f5b:26b4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by office2.cesnet.cz (Postfix) with ESMTPSA id E50C21180072;\n Mon, 27 Nov 2023 10:25:18 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz;\n s=office2-2020; t=1701077120;\n bh=6Y4shkRqErNteqUhepxRTYo4nKM7a8mawTxE2MUrQFE=;\n h=From:To:Cc:Subject:Date;\n b=GDKHzM1xQzRP0ru4Z7n4XfFj4ZPoUg8P4z+dzW6q6wtLbqZy33cdy3VMKz5F7wicS\n QNe0Av0Hb4H39iYmXZmoUAYnpHTY7vuQjbRHqjL8Zj8US0gNZvHzm0fRLu7Wbah7Kj\n g3B6gnoNFp5L2pcvbSDWbVfSgn5rnUvm4YgkVc+S+beaZRWwWZn313WnhmAUadrfDI\n 5o3iEKakexnIp0WYb1ij4jfiQxntMPkIOmbjom9Lh/Myvs36+3f7ZKZtaa1EYFVeuQ\n oS8EHs7MQFfE7pQ9oEdHouOI5h/+7ACMAYRxgdeX/417HYG6FXINOiaQd4gwTebs+t\n 5ZSXqj2s1gQ1A==",
        "From": "David Vodak <vodak@cesnet.cz>",
        "To": "dev@dpdk.org",
        "Cc": "David Vodak <vodak@cesnet.cz>",
        "Subject": "[PATCH] eal: introduce missing rte_thread wrappers",
        "Date": "Mon, 27 Nov 2023 10:25:02 +0100",
        "Message-ID": "<20231127092502.18510-1-vodak@cesnet.cz>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Function rte_ctrl_thread_create has been replaced by rte_thread_create_control,\nencouraging Linux users to switch from the pthread_t API to the rte_thread API.\nHowever the rte_thread API does not provide wrappers for all pthread functions.\nThis commit introduces equivalent functions for pthread_timedjoin_np,\npthread_getname_np and pthread_cancel.\n\nBugzilla ID: 1330\n---\n lib/eal/include/rte_thread.h | 49 ++++++++++++++++++++++++++++++++++++\n lib/eal/unix/rte_thread.c    | 20 +++++++++++++++\n lib/eal/version.map          |  3 +++\n 3 files changed, 72 insertions(+)",
    "diff": "diff --git a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h\nindex 8da9d4d3fb..49a068eda7 100644\n--- a/lib/eal/include/rte_thread.h\n+++ b/lib/eal/include/rte_thread.h\n@@ -463,6 +463,55 @@ int rte_thread_value_set(rte_thread_key key, const void *value);\n  */\n void *rte_thread_value_get(rte_thread_key key);\n \n+/**\n+ * Try to join with a terminated thread. If thread has not yet terminated,\n+ * then the call blocks until a maximum time, specified in abstime.\n+ *\n+ * @param thread_id\n+ *   Id of the thread.\n+ *\n+ * @param retval\n+ *   Exit status of the thread.\n+ *\n+ * @param abstime\n+ *   Maximum time of call blocking, measured against the CLOCK_REALTIME clock.\n+ *\n+ * @return\n+ *   On success, return 0.\n+ *   On failure, return a positive errno-style error number.\n+ */\n+int rte_thread_timedjoin_np(rte_thread_t thread_id, void **retval, const struct timespec *abstime);\n+\n+/**\n+ * Get name of the thread.\n+ *\n+ * @param thread_id\n+ *   Id of the thread.\n+ *\n+ * @param name\n+ *   Name of the thread.\n+ *\n+ * @param size\n+ *   The number of bytes available in name.\n+ *\n+ * @return\n+ *   On success, return 0.\n+ *   On failure, return a positive errno-style error number.\n+ */\n+int rte_thread_getname_np(rte_thread_t thread_id, char name[], size_t size);\n+\n+/**\n+ * Send a cancelation request to a thread.\n+ *\n+ * @param thread_id\n+ *   Id of the thread.\n+ *\n+ * @return\n+ *   On success, return 0.\n+ *   On failure, return a positive errno-style error number.\n+ */\n+int rte_thread_cancel(rte_thread_t thread_id);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/eal/unix/rte_thread.c b/lib/eal/unix/rte_thread.c\nindex 36a21ab2f9..79986bee6a 100644\n--- a/lib/eal/unix/rte_thread.c\n+++ b/lib/eal/unix/rte_thread.c\n@@ -378,3 +378,23 @@ rte_thread_get_affinity_by_id(rte_thread_t thread_id,\n \treturn pthread_getaffinity_np((pthread_t)thread_id.opaque_id,\n \t\tsizeof(*cpuset), cpuset);\n }\n+\n+int\n+rte_thread_timedjoin_np(rte_thread_t thread_id, void **retval,\n+\t\tconst struct timespec *abstime)\n+{\n+\treturn pthread_timedjoin_np((pthread_t) thread_id.opaque_id, retval,\n+\t\tabstime);\n+}\n+\n+int\n+rte_thread_getname_np(rte_thread_t thread_id, char name[], size_t size)\n+{\n+\treturn pthread_getname_np((pthread_t) thread_id.opaque_id, name, size);\n+}\n+\n+int\n+rte_thread_cancel(rte_thread_t thread_id)\n+{\n+\treturn pthread_cancel((pthread_t) thread_id.opaque_id);\n+}\ndiff --git a/lib/eal/version.map b/lib/eal/version.map\nindex 5e0cd47c82..66ac45b7de 100644\n--- a/lib/eal/version.map\n+++ b/lib/eal/version.map\n@@ -310,6 +310,9 @@ DPDK_24 {\n \trte_thread_unregister;\n \trte_thread_value_get;\n \trte_thread_value_set;\n+\trte_thread_timedjoin_np; # WINDOWS_NO_EXPORT\n+\trte_thread_getname_np; # WINDOWS_NO_EXPORT\n+\trte_thread_cancel; # WINDOWS_NO_EXPORT\n \trte_uuid_compare;\n \trte_uuid_is_null;\n \trte_uuid_parse;\n",
    "prefixes": []
}