From 9deec7c8bab24659e78172dd850f4ca37c57940c Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 14 May 2020 17:02:38 -0300 Subject: string: Remove old TLS usage on strsignal The per-thread state is refactored two use two strategies: 1. The default one uses a TLS structure, which will be placed in the static TLS space (using __thread keyword). 2. Linux allocates via struct pthread and access it through THREAD_* macros. The default strategy has the disadvantage of increasing libc.so static TLS consumption and thus decreasing the possible surplus used in some scenarios (which might be mitigated by BZ#25051 fix). It is used only on Hurd, where accessing the thread storage in the in single thread case is not straightforward (afaiu, Hurd developers could correct me here). The fallback static allocation used for allocation failure is also removed: defining its size is problematic without synchronizing with translated messages (to avoid partial translation) and the resulting usage is not thread-safe. Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell Reviewed-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/tls-internal.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/tls-internal.c (limited to 'sysdeps/unix/sysv/linux/tls-internal.c') diff --git a/sysdeps/unix/sysv/linux/tls-internal.c b/sysdeps/unix/sysv/linux/tls-internal.c new file mode 100644 index 0000000000..6e25b021ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/tls-internal.c @@ -0,0 +1 @@ +/* Empty. */ -- cgit v1.2.3-70-g09d2