get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2202501,
    "url": "http://patchwork.ozlabs.org/api/patches/2202501/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260227183851.2113417-3-adhemerval.zanella@linaro.org/",
    "project": {
        "id": 41,
        "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api",
        "name": "GNU C Library",
        "link_name": "glibc",
        "list_id": "libc-alpha.sourceware.org",
        "list_email": "libc-alpha@sourceware.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260227183851.2113417-3-adhemerval.zanella@linaro.org>",
    "list_archive_url": null,
    "date": "2026-02-27T18:37:44",
    "name": "[v7,2/5] nptl: Add __raise_direct",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "805359aa837db011527557a6553ea13f3559ba56",
    "submitter": {
        "id": 66065,
        "url": "http://patchwork.ozlabs.org/api/people/66065/?format=api",
        "name": "Adhemerval Zanella",
        "email": "adhemerval.zanella@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260227183851.2113417-3-adhemerval.zanella@linaro.org/mbox/",
    "series": [
        {
            "id": 493795,
            "url": "http://patchwork.ozlabs.org/api/series/493795/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=493795",
            "date": "2026-02-27T18:37:42",
            "name": "elf: Allow RPATH/RUNPATH for static-pie (BZ 33326)",
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/493795/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2202501/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2202501/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "libc-alpha@sourceware.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "libc-alpha@sourceware.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=M4YhhxAC;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=M4YhhxAC",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "sourceware.org; spf=pass smtp.mailfrom=linaro.org",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=2607:f8b0:4864:20::a29"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fMxvG2DYnz1xxV\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Feb 2026 05:39:38 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 54ADE4BA23FC\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Feb 2026 18:39:36 +0000 (GMT)",
            "from mail-vk1-xa29.google.com (mail-vk1-xa29.google.com\n [IPv6:2607:f8b0:4864:20::a29])\n by sourceware.org (Postfix) with ESMTPS id 63C924BA23E8\n for <libc-alpha@sourceware.org>; Fri, 27 Feb 2026 18:39:03 +0000 (GMT)",
            "by mail-vk1-xa29.google.com with SMTP id\n 71dfb90a1353d-56a87098868so864396e0c.1\n for <libc-alpha@sourceware.org>; Fri, 27 Feb 2026 10:39:03 -0800 (PST)",
            "from ubuntu-vm.. ([191.54.27.153]) by smtp.gmail.com with ESMTPSA id\n ada2fe7eead31-5ff1ea6ea19sm6283369137.12.2026.02.27.10.39.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Feb 2026 10:39:01 -0800 (PST)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 54ADE4BA23FC",
            "OpenDKIM Filter v2.11.0 sourceware.org 63C924BA23E8"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 63C924BA23E8",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 63C924BA23E8",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772217543; cv=none;\n b=uS+zCli9D7d+dQ3m31Twwsarz2iruFIRSgf0akckwP6Z/8c3ELzYoDbLR29UoLAa/eP+kpQ5nPoj+Hp4FoOm0SskZ2zQnI/bnL1RglmCCry23YraAs0jIkj1sWJVVT0jrn9ZhjqwpA9b+7+lfEBrk7p0ePIDjniSZluslyocekc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1772217543; c=relaxed/simple;\n bh=vEi9Ht9xFcxUdaQLqgDteaURUzXByXem/88egtPbARM=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=nSs87UM0avumdSMxT5Sq0hSFEhf3Bv2xiIQaFOu70+zArXsYIt36BWpTH3vxbYcJdU47td2M4ezuSmvOxCdMmq51W5wznL1H+tm9jZ/VklSrVE5Ia++kKdz3NIHSFueJ5Pu0L1CYidKEXFWSux73nQDUTCVyEwe28KHEOkyam4g=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1772217542; x=1772822342; darn=sourceware.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=boWKgz1BjsJ4wJjWPsJFYD52ancj3+ZDr840+L9cBuw=;\n b=M4YhhxACi938XtiNHxRL1G4qW5hpDI+9J9px/l7f/qqoi5/qQ83FzDBAS6jedTIL4Z\n dVc7Cd6hYMI95bf+KHcihnzdwuYp2gQWAHV5yX2kD94PXI3P/FF0j8XY4Y80iv9LQ65t\n qt8ALe6rVhpyDOjJ/Y8CyyTj93GLJWb6b37foS0M2PELNDokXB0Apa1UugSb2w2jPr9a\n aSZIa6aHzebKOfyNK4EePvtbsCImBZ/g9gCkFf5Qc+8AjvfEPqai9nkZDXkVtEs8ngNk\n Biuwid4GQuokNfcx0NKDKcQUGAsWakZO1/CTTVVCajeR7HBObsCGhfP+beimogP8BsWJ\n lfKg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1772217542; x=1772822342;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=boWKgz1BjsJ4wJjWPsJFYD52ancj3+ZDr840+L9cBuw=;\n b=qv6stJqTw4a4VHIrPPXrmuYF17F+vTdJQRl5K3LMdRNmc6j0Ns83xZ2/JXA3BLZpsj\n GdErh/ISDezabTBVkSo+TwkgXr5/uevWRanIVcPD3GRpMVI1UigjZ7Ewlws5fYk0QooI\n EuvDpQx5Kpup/T+QzsuyyN9K1EnUPcaJI/UfToKm3QEMTaEtf1K0NPI1LHCi52NJwvut\n nbRgb2skYA+yXf+fZUnuFArJIAGrN6UhWghvC2uoL8HkS1mzYs8QpmJEhHbGTAl8lpG8\n ttySsfDd+3mQiWlFz2vp6x9JzFZHN6g3V9pPa1r61ywAhTDP3SVlWOsSOEm9jcr2n6p2\n 3ACw==",
        "X-Gm-Message-State": "AOJu0Yxe7pJLkcd9Oa4bRt9YeFTq8Z7jAl6jK5HEfTjRU0gk0lzMdijB\n rb48yc2Et+FYq8y9nFh14kIXhb18c7FVSDcOgRU5jRRkhDDSLmFTwiLZgh3n5ObWjFAnZWYgu2J\n HY3m2",
        "X-Gm-Gg": "ATEYQzwegTpXyH9c7pJYhBlsagPAzqZs5X+jKl+r1/gqpoZ/8NmSiAXCOtS0tK3YCnB\n i/bQhyWjG1TO9UBK1S9pxw4Vee7C9NeaEgHqgjqf4zkxtiuS2Z1v+1qvt7/Bc9W1HLxIbN0N+tx\n dHM0BdfkwgZMa/ePUngBPA4RDSbqENFp/O269Jp63ilM9ruMN6+LU16SOk84grsN6ikUi5MeMmq\n 160PGc0Jt1na/dS/gbWva0WK8gpyFTZ9V8IOAREtQrnUKv7+nIelr+7O0A6VzLKud0XPLvctDsc\n gZai6Z3Wjqpk/Jq2TAwgudsg5SCJffgMVBJLXnsG19PfPoIb8OOK0hV9lUwsSptntGhn8vm6loc\n ht1p3SN3ARmVuTGcl047UET7Odw+Xw/FG/teS6azC3DbnYWwApWkVCfhqtLxCBSSfU9ZpXVNLWG\n XH31HFYSq0rcVAIEpXlL6VaTawDcc9Lea3uT8=",
        "X-Received": "by 2002:a05:6102:5493:b0:5fe:c506:c83 with SMTP id\n ada2fe7eead31-5ff3259fb89mr1544223137.39.1772217542316;\n Fri, 27 Feb 2026 10:39:02 -0800 (PST)",
        "From": "Adhemerval Zanella <adhemerval.zanella@linaro.org>",
        "To": "libc-alpha@sourceware.org",
        "Cc": "Florian Weimer <fweimer@redhat.com>",
        "Subject": "[PATCH v7 2/5] nptl: Add __raise_direct",
        "Date": "Fri, 27 Feb 2026 18:37:44 +0000",
        "Message-ID": "<20260227183851.2113417-3-adhemerval.zanella@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260227183851.2113417-1-adhemerval.zanella@linaro.org>",
        "References": "<20260227183851.2113417-1-adhemerval.zanella@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libc-alpha@sourceware.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>",
        "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>",
        "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>",
        "List-Post": "<mailto:libc-alpha@sourceware.org>",
        "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>",
        "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>",
        "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org"
    },
    "content": "The function sends a signal to current thread using raw syscalls.\n---\n include/signal.h                       |  3 +++\n nptl/pthread_kill.c                    | 21 +++++++------------\n signal/raise.c                         |  6 ++++++\n sysdeps/htl/raise.c                    |  3 +++\n sysdeps/posix/raise.c                  |  2 +-\n sysdeps/unix/sysv/linux/Makefile       |  4 ++++\n sysdeps/unix/sysv/linux/raise_direct.c | 29 ++++++++++++++++++++++++++\n 7 files changed, 53 insertions(+), 15 deletions(-)\n create mode 100644 sysdeps/unix/sysv/linux/raise_direct.c",
    "diff": "diff --git a/include/signal.h b/include/signal.h\nindex 73f18dddd7..099d721514 100644\n--- a/include/signal.h\n+++ b/include/signal.h\n@@ -65,6 +65,9 @@ extern int __xpg_sigpause (int sig);\n /* Allocate real-time signal with highest/lowest available priority.  */\n extern int __libc_allocate_rtsig (int __high);\n \n+/* Similar to raise, but does not set errno.  */\n+extern int __raise_direct (int signo) attribute_hidden;\n+\n #  if IS_IN (rtld)\n extern __typeof (__sigaction) __sigaction attribute_hidden;\n extern __typeof (__libc_sigaction) __libc_sigaction attribute_hidden;\ndiff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c\nindex 221689e36a..bc038e9824 100644\n--- a/nptl/pthread_kill.c\n+++ b/nptl/pthread_kill.c\n@@ -29,20 +29,13 @@ __pthread_kill_implementation (pthread_t threadid, int signo, int no_tid)\n {\n   struct pthread *pd = (struct pthread *) threadid;\n   if (pd == THREAD_SELF)\n-    {\n-      /* Use the actual TID from the kernel, so that it refers to the\n-         current thread even if called after vfork.  There is no\n-         signal blocking in this case, so that the signal is delivered\n-         immediately, before __pthread_kill_internal returns: a signal\n-         sent to the thread itself needs to be delivered\n-         synchronously.  (It is unclear if Linux guarantees the\n-         delivery of all pending signals after unblocking in the code\n-         below.  POSIX only guarantees delivery of a single signal,\n-         which may not be the right one.)  */\n-      pid_t tid = INTERNAL_SYSCALL_CALL (gettid);\n-      int ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), tid, signo);\n-      return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;\n-    }\n+    /* There is no signal blocking in this case, so that the signal is\n+       delivered immediately, before __pthread_kill_internal returns: a signal\n+       sent to the thread itself needs to be delivered synchronously.  (It is\n+       unclear whether Linux guarantees the delivery of all pending signals\n+       after unblocking in the code  below.  POSIX only guarantees delivery\n+       of a single signal, which may not be the right one.)  */\n+    return __raise_direct (signo);\n \n   /* Block all signals, as required by pd->exit_lock.  */\n   internal_sigset_t old_mask;\ndiff --git a/signal/raise.c b/signal/raise.c\nindex b6f5cbee4e..13a2896549 100644\n--- a/signal/raise.c\n+++ b/signal/raise.c\n@@ -27,5 +27,11 @@ raise (int sig)\n }\n weak_alias (raise, gsignal)\n \n+int\n+raise_direct (int sig)\n+{\n+  return -1;\n+}\n+\n stub_warning (raise)\n stub_warning (gsignal)\ndiff --git a/sysdeps/htl/raise.c b/sysdeps/htl/raise.c\nindex 3200f91634..9c8bccc5a9 100644\n--- a/sysdeps/htl/raise.c\n+++ b/sysdeps/htl/raise.c\n@@ -51,6 +51,9 @@ raise (int signo)\n   else\n     return __kill (__getpid (), signo);\n }\n+/* TODO: __raise_direct should not change errno and work during process\n+   startup.  */\n+weak_alias (raise, __raise_direct)\n \n libc_hidden_def (raise)\n weak_alias (raise, gsignal)\ndiff --git a/sysdeps/posix/raise.c b/sysdeps/posix/raise.c\nindex 8abe8d4cad..cf0770f1c8 100644\n--- a/sysdeps/posix/raise.c\n+++ b/sysdeps/posix/raise.c\n@@ -23,7 +23,7 @@\n int\n raise (int sig)\n {\n-  int ret = __pthread_kill (__pthread_self (), sig);\n+  int ret = __raise_direct (sig);\n   if (ret != 0)\n     {\n       __set_errno (ret);\ndiff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile\nindex c6bd97abf1..8797c5c9b3 100644\n--- a/sysdeps/unix/sysv/linux/Makefile\n+++ b/sysdeps/unix/sysv/linux/Makefile\n@@ -455,6 +455,10 @@ tests += \\\n endif\n \n ifeq ($(subdir),signal)\n+sysdep_routines += \\\n+  raise_direct \\\n+  # sysdep_routines\n+\n tests-special += \\\n   $(objpfx)tst-signal-numbers.out \\\n   # tests-special\ndiff --git a/sysdeps/unix/sysv/linux/raise_direct.c b/sysdeps/unix/sysv/linux/raise_direct.c\nnew file mode 100644\nindex 0000000000..d38bd10817\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/raise_direct.c\n@@ -0,0 +1,29 @@\n+/* Internal function to send a signal to itself.  Linux version.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+#include <sysdep.h>\n+#include <pthread.h>\n+#include <unistd.h>\n+\n+int\n+__raise_direct (int signo)\n+{\n+  pid_t tid = INTERNAL_SYSCALL_CALL (gettid);\n+  int ret = INTERNAL_SYSCALL_CALL (tkill, tid, signo);\n+  return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;\n+}\n",
    "prefixes": [
        "v7",
        "2/5"
    ]
}