From fa57c3019320bb771cfbbc099e3ca31eb4696ad3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 15 Aug 2019 10:51:23 +0200 Subject: nptl: Move pthread_attr_destroy implementation into libc --- nptl/Makefile | 5 +++-- nptl/Versions | 2 +- nptl/forward.c | 2 -- nptl/nptl-init.c | 1 - nptl/pthread_attr_destroy.c | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index e66b115..a643306 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -30,7 +30,8 @@ extra-libs-others := $(extra-libs) routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \ libc-cleanup libc_pthread_init libc_multiple_threads \ register-atfork pthread_atfork pthread_self thrd_current \ - thrd_equal thrd_sleep thrd_yield pthread_equal + thrd_equal thrd_sleep thrd_yield pthread_equal \ + pthread_attr_destroy shared-only-routines = forward static-only-routines = pthread_atfork @@ -54,7 +55,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \ pthread_getconcurrency pthread_setconcurrency \ pthread_getschedparam pthread_setschedparam \ pthread_setschedprio \ - pthread_attr_init pthread_attr_destroy \ + pthread_attr_init \ pthread_attr_getdetachstate pthread_attr_setdetachstate \ pthread_attr_getguardsize pthread_attr_setguardsize \ pthread_attr_getschedparam pthread_attr_setschedparam \ diff --git a/nptl/Versions b/nptl/Versions index f2ea2b3..50d6717 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -49,7 +49,7 @@ libpthread { pthread_getschedparam; pthread_setschedparam; - pthread_attr_init; pthread_attr_destroy; + pthread_attr_init; pthread_attr_getdetachstate; pthread_attr_setdetachstate; pthread_attr_getschedparam; pthread_attr_setschedparam; pthread_attr_getschedpolicy; pthread_attr_setschedpolicy; diff --git a/nptl/forward.c b/nptl/forward.c index 3ec9a46..c7d385b 100644 --- a/nptl/forward.c +++ b/nptl/forward.c @@ -56,8 +56,6 @@ name decl \ FORWARD2 (name, int, decl, params, return defretval) -FORWARD (pthread_attr_destroy, (pthread_attr_t *attr), (attr), 0) - #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_1) FORWARD (__pthread_attr_init_2_0, (pthread_attr_t *attr), (attr), 0) compat_symbol (libc, __pthread_attr_init_2_0, pthread_attr_init, GLIBC_2_0); diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 5734e21..8fc4f46 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -72,7 +72,6 @@ void __nptl_set_robust (struct pthread *); #ifdef SHARED static const struct pthread_functions pthread_functions = { - .ptr_pthread_attr_destroy = __pthread_attr_destroy, # if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) .ptr___pthread_attr_init_2_0 = __pthread_attr_init_2_0, # endif diff --git a/nptl/pthread_attr_destroy.c b/nptl/pthread_attr_destroy.c index e013f3d..1822031 100644 --- a/nptl/pthread_attr_destroy.c +++ b/nptl/pthread_attr_destroy.c @@ -29,7 +29,7 @@ __pthread_attr_destroy (pthread_attr_t *attr) iattr = (struct pthread_attr *) attr; -#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_1) /* In old struct pthread_attr, neither next nor cpuset are present. */ if (__builtin_expect ((iattr->flags & ATTR_FLAG_OLDATTR), 0) == 0) -- cgit v1.1