From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
Fangrui Song <maskray@google.com>
Subject: Re: [PATCH v3 4/4] Remove single-thread.h
Date: Tue, 5 Jul 2022 11:43:18 +0000 [thread overview]
Message-ID: <AM5PR0801MB16680CF1ACBBDE9031F8ABF883819@AM5PR0801MB1668.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20220621203225.714328-5-adhemerval.zanella@linaro.org>
> And move SINGLE_THREAD_P macro to sys/single_threaded.h.
LGTM
Cheers,
Wilco
---
include/sys/single_threaded.h | 13 ++++++--
sysdeps/generic/single-thread.h | 25 ----------------
sysdeps/mach/hurd/sysdep-cancel.h | 5 ----
sysdeps/unix/sysdep.h | 2 +-
.../unix/sysv/linux/aarch64/single-thread.h | 2 --
sysdeps/unix/sysv/linux/arc/single-thread.h | 2 --
sysdeps/unix/sysv/linux/arm/single-thread.h | 2 --
sysdeps/unix/sysv/linux/hppa/single-thread.h | 2 --
.../sysv/linux/microblaze/single-thread.h | 2 --
sysdeps/unix/sysv/linux/s390/single-thread.h | 2 --
sysdeps/unix/sysv/linux/single-thread.h | 30 -------------------
.../unix/sysv/linux/x86_64/single-thread.h | 2 --
12 files changed, 11 insertions(+), 78 deletions(-)
delete mode 100644 sysdeps/generic/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/aarch64/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/arc/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/arm/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/hppa/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/microblaze/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/s390/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/single-thread.h
delete mode 100644 sysdeps/unix/sysv/linux/x86_64/single-thread.h
diff --git a/include/sys/single_threaded.h b/include/sys/single_threaded.h
index 2015742be0..f42e40547e 100644
--- a/include/sys/single_threaded.h
+++ b/include/sys/single_threaded.h
@@ -1,6 +1,7 @@
-#include <misc/sys/single_threaded.h>
+#ifndef __ASSEMBLER__
+# include <misc/sys/single_threaded.h>
-#ifndef _ISOMAC
+# ifndef _ISOMAC
libc_hidden_proto_alias (__libc_single_threaded,
__libc_single_threaded_internal);
@@ -9,4 +10,10 @@ libc_hidden_proto_alias (__libc_single_threaded,
# define __libc_single_threaded_internal __libc_single_threaded
#endif
-#endif
+# define SINGLE_THREAD_P (__libc_single_threaded_internal != 0)
+
+# define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P
+
+# endif
+
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/generic/single-thread.h b/sysdeps/generic/single-thread.h
deleted file mode 100644
index 7f8222b38a..0000000000
--- a/sysdeps/generic/single-thread.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Single thread optimization, generic version.
- Copyright (C) 2019-2022 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/>. */
-
-#ifndef _SINGLE_THREAD_H
-#define _SINGLE_THREAD_H
-
-#define SINGLE_THREAD_P (0)
-#define RTLD_SINGLE_THREAD_P (0)
-
-#endif /* _SINGLE_THREAD_H */
diff --git a/sysdeps/mach/hurd/sysdep-cancel.h b/sysdeps/mach/hurd/sysdep-cancel.h
index 669c17151a..9311367ab9 100644
--- a/sysdeps/mach/hurd/sysdep-cancel.h
+++ b/sysdeps/mach/hurd/sysdep-cancel.h
@@ -6,11 +6,6 @@ void __pthread_disable_asynccancel (int oldtype);
#pragma weak __pthread_enable_asynccancel
#pragma weak __pthread_disable_asynccancel
-/* Always multi-thread (since there's at least the sig handler), but no
- handling enabled. */
-#define SINGLE_THREAD_P (0)
-#define RTLD_SINGLE_THREAD_P (0)
-
#define LIBC_CANCEL_ASYNC() ({ \
int __cancel_oldtype = 0; \
if (__pthread_enable_asynccancel) \
diff --git a/sysdeps/unix/sysdep.h b/sysdeps/unix/sysdep.h
index a1d9df4c73..a8abecb92b 100644
--- a/sysdeps/unix/sysdep.h
+++ b/sysdeps/unix/sysdep.h
@@ -16,7 +16,7 @@
<https://www.gnu.org/licenses/>. */
#include <sysdeps/generic/sysdep.h>
-#include <single-thread.h>
+#include <sys/single_threaded.h>
#include <sys/syscall.h>
#define HAVE_SYSCALLS
diff --git a/sysdeps/unix/sysv/linux/aarch64/single-thread.h b/sysdeps/unix/sysv/linux/aarch64/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/aarch64/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
diff --git a/sysdeps/unix/sysv/linux/arc/single-thread.h b/sysdeps/unix/sysv/linux/arc/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/arc/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
diff --git a/sysdeps/unix/sysv/linux/arm/single-thread.h b/sysdeps/unix/sysv/linux/arm/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/arm/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/single-thread.h b/sysdeps/unix/sysv/linux/hppa/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
diff --git a/sysdeps/unix/sysv/linux/microblaze/single-thread.h b/sysdeps/unix/sysv/linux/microblaze/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/microblaze/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
diff --git a/sysdeps/unix/sysv/linux/s390/single-thread.h b/sysdeps/unix/sysv/linux/s390/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/s390/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
diff --git a/sysdeps/unix/sysv/linux/single-thread.h b/sysdeps/unix/sysv/linux/single-thread.h
deleted file mode 100644
index 2099848cf3..0000000000
--- a/sysdeps/unix/sysv/linux/single-thread.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Single thread optimization, Linux version.
- Copyright (C) 2019-2022 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/>. */
-
-#ifndef _SINGLE_THREAD_H
-#define _SINGLE_THREAD_H
-
-#ifndef __ASSEMBLER__
-# include <sys/single_threaded.h>
-#endif
-
-#define SINGLE_THREAD_P (__libc_single_threaded_internal != 0)
-
-#define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P
-
-#endif /* _SINGLE_THREAD_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/single-thread.h b/sysdeps/unix/sysv/linux/x86_64/single-thread.h
deleted file mode 100644
index a5d3a2aaf4..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/single-thread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SINGLE_THREAD_BY_GLOBAL
-#include_next <single-thread.h>
--
2.34.1
prev parent reply other threads:[~2022-07-05 11:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 20:32 [PATCH v3 0/4] Simplify internal single-threaded usage Adhemerval Zanella
2022-06-21 20:32 ` [PATCH v3 1/4] misc: Optimize internal usage of __libc_single_threaded Adhemerval Zanella
2022-06-23 4:15 ` Fangrui Song
2022-06-23 14:05 ` Adhemerval Zanella
2022-06-21 20:32 ` [PATCH v3 2/4] Replace __libc_multiple_threads with __libc_single_threaded Adhemerval Zanella
2022-06-22 11:04 ` Yann Droneaud
2022-06-22 12:24 ` Adhemerval Zanella
2022-06-22 13:53 ` Yann Droneaud
2022-07-05 11:34 ` Wilco Dijkstra
2022-06-21 20:32 ` [PATCH v3 3/4] Remove usage of TLS_MULTIPLE_THREADS_IN_TCB Adhemerval Zanella
2022-06-21 20:32 ` [PATCH v3 4/4] Remove single-thread.h Adhemerval Zanella
2022-07-05 11:43 ` Wilco Dijkstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM5PR0801MB16680CF1ACBBDE9031F8ABF883819@AM5PR0801MB1668.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).