diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-11-13 23:08:34 +0100 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-11-13 23:23:13 +0100 |
| commit | 23b8e6ae4fb4ccb28fcf92d86dbb351df3a591b7 (patch) | |
| tree | ad6fac85fe9581e0e145f7c86fddfb2c4bb059da /sysdeps | |
| parent | 6c933807a94ed4bd8211590179060120a2d530e7 (diff) | |
htl: Drop pthread-functions infrastructure
All previously forwarded functions are now called directly (either via local
call in libc, or through a __export).t
Diffstat (limited to 'sysdeps')
| -rw-r--r-- | sysdeps/htl/libc-lockP.h | 35 | ||||
| -rw-r--r-- | sysdeps/htl/pthread-functions.h | 40 | ||||
| -rw-r--r-- | sysdeps/mach/hurd/htl/pt-sysdep.c | 3 | ||||
| -rw-r--r-- | sysdeps/nptl/libc-lockP.h | 7 |
4 files changed, 0 insertions, 85 deletions
diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h index e9977e46a1..82e769ea00 100644 --- a/sysdeps/htl/libc-lockP.h +++ b/sysdeps/htl/libc-lockP.h @@ -20,7 +20,6 @@ #define _BITS_LIBC_LOCKP_H 1 #include <pthread.h> -#include <pthread-functions.h> /* If we check for a weakly referenced symbol and then perform a normal jump to it te code generated for some platforms in case of @@ -36,40 +35,6 @@ (FUNC != NULL ? FUNC ARGS : ELSE) #endif -/* Call thread functions through the function pointer table. */ -#if defined SHARED && IS_IN (libc) -# define PTFAVAIL(NAME) __libc_pthread_functions_init -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE) -# define __libc_ptf_call_always(FUNC, ARGS) \ - PTHFCT_CALL (ptr_##FUNC, ARGS) -#elif IS_IN (libpthread) -# define PTFAVAIL(NAME) 1 -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - FUNC ARGS -# define __libc_ptf_call_always(FUNC, ARGS) \ - FUNC ARGS -#else -# define PTFAVAIL(NAME) (NAME != NULL) -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - __libc_maybe_call (FUNC, ARGS, ELSE) -# define __libc_ptf_call_always(FUNC, ARGS) \ - FUNC ARGS -#endif - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - __libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - __libc_ptf_call (__pthread_getspecific, (KEY), NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - __libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0) - - /* Functions that are used by this file and are internal to the GNU C library. */ diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h deleted file mode 100644 index 4fab472e50..0000000000 --- a/sysdeps/htl/pthread-functions.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Declaration of libc stubs for pthread functions. Hurd version. - Copyright (C) 2003-2025 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 _PTHREAD_FUNCTIONS_H -#define _PTHREAD_FUNCTIONS_H 1 - -#include <pthread.h> - -/* Data type shared with libc. The libc uses it to pass on calls to - the thread functions. Wine pokes directly into this structure, - so if possible avoid breaking it and append new hooks to the end. */ -struct pthread_functions -{ -}; - -/* Variable in libc.so. */ -extern struct pthread_functions __libc_pthread_functions attribute_hidden; -extern int __libc_pthread_functions_init attribute_hidden; - -void __libc_pthread_init (const struct pthread_functions *functions); - -#define PTHFCT_CALL(fct, params) \ - __libc_pthread_functions.fct params - -#endif /* pthread-functions.h */ diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.c b/sysdeps/mach/hurd/htl/pt-sysdep.c index 735dc5b68d..43745095bf 100644 --- a/sysdeps/mach/hurd/htl/pt-sysdep.c +++ b/sysdeps/mach/hurd/htl/pt-sysdep.c @@ -48,9 +48,6 @@ _init_routine (void *stack) /* Already initialized */ return; - /* Initialize the library. */ - ___pthread_init (); - if (stack != NULL) { /* We are given a stack, use it. */ diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h index 1be3dd1ec1..74ae581a7c 100644 --- a/sysdeps/nptl/libc-lockP.h +++ b/sysdeps/nptl/libc-lockP.h @@ -90,13 +90,6 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0"); (FUNC != NULL ? FUNC ARGS : ELSE) #endif -/* All previously forwarded functions are now called directly (either - via local call in libc, or through a __export), but __libc_ptf_call - is still used in generic code shared with Hurd. */ -#define PTFAVAIL(NAME) 1 -#define __libc_ptf_call(FUNC, ARGS, ELSE) FUNC ARGS -#define __libc_ptf_call_always(FUNC, ARGS) FUNC ARGS - /* Initialize the named lock variable, leaving it in a consistent, unlocked state. */ #define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER)) |
