diff options
| author | gfleury <gfleury@disroot.org> | 2025-02-01 10:02:02 +0200 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-02-01 11:24:14 +0100 |
| commit | cf51d18b9daf510de1997d4d87328c03103a6b68 (patch) | |
| tree | 6dad8b2cbef8aa8b9857280e5f5c7c2616a4b6d1 /htl | |
| parent | 04588633cff835db7d838aa57c3def90d2621b76 (diff) | |
| download | glibc-cf51d18b9daf510de1997d4d87328c03103a6b68.tar.xz glibc-cf51d18b9daf510de1997d4d87328c03103a6b68.zip | |
htl: move pthread_setcancelstate into libc.
sysdeps/pthread/sem_open.c: call pthread_setcancelstate directely
since forward declaration is gone on hurd too
Message-ID: <20250201080202.494671-1-gfleury@disroot.org>
Diffstat (limited to 'htl')
| -rw-r--r-- | htl/Makefile | 2 | ||||
| -rw-r--r-- | htl/Versions | 3 | ||||
| -rw-r--r-- | htl/forward.c | 4 | ||||
| -rw-r--r-- | htl/pt-initialize.c | 1 | ||||
| -rw-r--r-- | htl/pt-setcancelstate.c | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/htl/Makefile b/htl/Makefile index d4418ab9f9..a4192a56b4 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -50,7 +50,6 @@ libpthread-routines := \ pt-join \ pt-spin-inlines \ pt-cleanup \ - pt-setcancelstate \ pt-testcancel \ pt-cancel \ pt-mutex-transfer-np \ @@ -203,6 +202,7 @@ routines := \ pt-nthreads \ pt-pthread_self \ pt-self pt-equal \ + pt-setcancelstate \ pt-setcanceltype \ pt-setschedparam \ pt-sigmask \ diff --git a/htl/Versions b/htl/Versions index 6801d12182..d8f1c7f437 100644 --- a/htl/Versions +++ b/htl/Versions @@ -56,6 +56,7 @@ libc { pthread_mutexattr_setprotocol; pthread_mutexattr_setpshared; pthread_mutexattr_settype; + pthread_setcancelstate; pthread_setcanceltype; pthread_sigmask; } @@ -146,6 +147,7 @@ libc { __pthread_attr_setstacksize; __pthread_attr_setstackaddr; __pthread_attr_setstack; + __pthread_setcancelstate; __pthread_cond_broadcast; __pthread_cond_destroy; __pthread_cond_init; @@ -232,7 +234,6 @@ libpthread { pthread_rwlockattr_destroy; pthread_rwlockattr_getpshared; pthread_rwlockattr_init; pthread_rwlockattr_setpshared; - pthread_setcancelstate; pthread_setconcurrency; pthread_setschedprio; pthread_setspecific; diff --git a/htl/forward.c b/htl/forward.c index 9455df7316..0a7a69644d 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -58,9 +58,5 @@ FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS)) strong_alias (__pthread_exit, pthread_exit); -FORWARD (__pthread_setcancelstate, (int state, int *oldstate), - (state, oldstate), 0) -strong_alias (__pthread_setcancelstate, pthread_setcancelstate); - FORWARD2 (__pthread_get_cleanup_stack, struct __pthread_cancelation_handler **, (void), (), return &__pthread_cleanup_stack); diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index eba9e12d73..53b9c76e8f 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -28,7 +28,6 @@ #if IS_IN (libpthread) static const struct pthread_functions pthread_functions = { .ptr___pthread_exit = __pthread_exit, - .ptr___pthread_setcancelstate = __pthread_setcancelstate, .ptr___pthread_get_cleanup_stack = __pthread_get_cleanup_stack, .ptr_pthread_once = __pthread_once, .ptr_pthread_rwlock_rdlock = __pthread_rwlock_rdlock, diff --git a/htl/pt-setcancelstate.c b/htl/pt-setcancelstate.c index 57894de718..6e09c260ea 100644 --- a/htl/pt-setcancelstate.c +++ b/htl/pt-setcancelstate.c @@ -17,7 +17,7 @@ <https://www.gnu.org/licenses/>. */ #include <pthread.h> - +#include <shlib-compat.h> #include <pt-internal.h> int @@ -42,5 +42,9 @@ __pthread_setcancelstate (int state, int *oldstate) return 0; } +libc_hidden_def (__pthread_setcancelstate) +versioned_symbol (libc, __pthread_setcancelstate, pthread_setcancelstate, GLIBC_2_21); -weak_alias (__pthread_setcancelstate, pthread_setcancelstate); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_setcancelstate, pthread_setcancelstate, GLIBC_2_12); +#endif |
