public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/fw/x86-shstk-backtrace] nptl: Wire up __nptl_arch_thread_init
@ 2024-05-31 20:49 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2024-05-31 20:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f5bfd0e47c842f47979751297d3b83f34be8476c

commit f5bfd0e47c842f47979751297d3b83f34be8476c
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu May 30 15:42:46 2024 +0200

    nptl: Wire up __nptl_arch_thread_init

Diff:
---
 nptl/pthread_create.c                |  3 +++
 sysdeps/nptl/nptl_arch_thread_init.h | 24 ++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 1d3665d5ed..c53b18e76f 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -38,6 +38,7 @@
 #include <version.h>
 #include <clone_internal.h>
 #include <futex-internal.h>
+#include <nptl_arch_thread_init.h>
 
 #include <shlib-compat.h>
 
@@ -363,6 +364,8 @@ start_thread (void *arg)
 	goto out;
     }
 
+  __nptl_arch_thread_init ();
+
   /* Initialize resolver state pointer.  */
   __resp = &pd->res;
 
diff --git a/sysdeps/nptl/nptl_arch_thread_init.h b/sysdeps/nptl/nptl_arch_thread_init.h
new file mode 100644
index 0000000000..2fa8ee5264
--- /dev/null
+++ b/sysdeps/nptl/nptl_arch_thread_init.h
@@ -0,0 +1,24 @@
+/* Architecture-specific thread initialization for NPTL.  Generic version.
+   Copyright (C) 2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* This is called on the new thread very early, when signals are still
+   disabled.  The generic version does nothing.  */
+static inline void
+__nptl_arch_thread_init (void)
+{
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-31 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 20:49 [glibc/fw/x86-shstk-backtrace] nptl: Wire up __nptl_arch_thread_init Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).