Commit Graph

2637 Commits

Author SHA1 Message Date
Florian Weimer
0197c1bc60 nptl: Move pthread_testcancel into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

A temporary __pthread_testcancel@@GLIBC_PRIVATE export is created
because it is needed by the semaphore implementation.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-05 17:19:20 +02:00
Florian Weimer
7cbf1c8416 elf, nptl: Initialize static TLS directly in ld.so
The stack list is available in ld.so since commit
1daccf403b ("nptl: Move stack list
variables into _rtld_global"), so it's possible to walk the stack
list directly in ld.so and perform the initialization there.

This eliminates an unprotected function pointer from _rtld_global
and reduces the libpthread initialization code.
2021-05-05 06:20:31 +02:00
Florian Weimer
dde76856ba nptl: Re-sort Versions file
Due to an incorrect conflict resolution, libc/GLIBC_2.2 section was no
longer sorted lexicographically.
2021-05-03 14:12:55 +02:00
Florian Weimer
c2fd60a586 nptl: Move pthread_yield into libc, as a compatibility symbol
And deprecate it in <pthread.h>, redirecting it to sched_yield
for the time being.

The symbol was moved using scripts/move-symbol-to-libc.py.

No GLIBC_2.34 symbol version is added because of the compatibility
symbol status.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:23:44 +02:00
Florian Weimer
0505ae4e3b nptl: Move pthread_rwlockattr_setpshared into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:45 +02:00
Florian Weimer
b444409479 nptl: Move pthread_rwlockattr_setkind_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:42 +02:00
Florian Weimer
dbfa12e201 nptl: Move pthread_rwlockattr_init into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:38 +02:00
Florian Weimer
0af0ccc2d5 nptl: Move pthread_rwlockattr_getpshared into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:35 +02:00
Florian Weimer
9f13a95b6f nptl: Move pthread_rwlockattr_getkind_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:31 +02:00
Florian Weimer
a8841e00d6 nptl: Move pthread_rwlockattr_destroy into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:25 +02:00
Florian Weimer
e8a9597159 nptl: Move pthread_rwlock_trywrlock into libc
And __pthread_rwlock_trywrlock as a compatibility symbol.

Remove the unused __libc_rwlock_trywrlock macro.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:20 +02:00
Florian Weimer
c96dddd731 nptl: Move pthread_rwlock_tryrdlock into libc
And __pthread_rwlock_tryrdlock as a compatibility symbol.

Remove the unused __libc_rwlock_tryrdlock macro.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:16 +02:00
Florian Weimer
e7d2d48e56 nptl: Move pthread_rwlock_timedwrlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:12 +02:00
Florian Weimer
2392feb171 nptl: Move pthread_rwlock_timedrdlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:18:04 +02:00
Florian Weimer
63627246f3 nptl: Move pthread_rwlock_init into libc
And __pthread_rwlock_init as a compatibility symbol.

__libc_rwlock_init is changed to call __pthread_rwlock_init directly.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:17:59 +02:00
Florian Weimer
504ac633b0 nptl: Move pthread_rwlock_destroy into libc
And __pthread_rwlock_destroy as a compatibility symbol.

rwlocks do not need finalization, so change __libc_rwlock_fini to do
nothing.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:17:36 +02:00
Florian Weimer
2cf5b43bcb nptl: Move pthread_rwlock_clockwrlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:17:27 +02:00
Florian Weimer
0ace9b197c nptl: Move pthread_rwlock_clockrdlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 09:16:49 +02:00
Florian Weimer
2c5c5c87c9 nptl: Move tss_set into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_setspecific@@GLIBC_2.34 is no longer needed after the move,
so it is removed with this commit, too.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:18:08 +02:00
Florian Weimer
a062ba3836 nptl: Move tss_get into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_getspecific@@GLIBC_2.34 is no longer needed after the move,
so it is removed with this commit, too.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:18:01 +02:00
Florian Weimer
deb317d510 nptl: Move tss_delete into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_key_delete@@GLIBC_PRIVATE is no longer needed after that,
so it is removed as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:17:38 +02:00
Florian Weimer
e4036b1ce9 nptl: Move tss_create into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_key_create@@GLIBC_2.34 is no longer needed by glibc
itself with this change, but __pthread_key_create is used by
libstdc++, so it still has to be exported as a public symbol.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:17:29 +02:00
Florian Weimer
96e61709b4 nptl: Move thrd_exit into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_exit@@GLIBC_PRIVATE symbol is no longer needed
after this change, so remove it.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:17:15 +02:00
Florian Weimer
ae4a5ca074 nptl: Move mtx_unlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_mutex_unlock@GLIBC_2.34 is not removed in this commit
because it is still used from nptl/nptl-init.c.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:16:48 +02:00
Florian Weimer
08970190fc nptl: Move mtx_trylock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_mutex_trylock@@GLIBC_2.34 symbol version is no longer
needed because the call is now internal to libc, so remove it with
this commit.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:58 +02:00
Florian Weimer
032a9e17a7 nptl: Move mtx_timedlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_mutex_timedlock@@GLIBC_PRIVATE export is no longer
needed, so it is removed with this commit.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:53 +02:00
Florian Weimer
b7863c732e nptl: Move mtx_lock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_mutex_lock@GLIBC_2.34 is not removed in this commit
because it is still used from nptl/nptl-init.c.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:41 +02:00
Florian Weimer
f44c9a24ed nptl: Move mtx_init into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The calls to __pthread_mutex_init, __pthread_mutexattr_init,
__pthread_mutexattr_settype are now private and no longer need
to be exported.  This allows the removal of the newly added
GLIBC_2.34 symbol versions for those functions.

Also clean up some weak declarations in <libc-lockP.h> for
these functions.  They are not needed and potentially incorrect
for static linking of mtx_init.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:22 +02:00
Florian Weimer
17b67416c5 nptl: Move mtx_destroy into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_mutex_destroy@@GLIBC_2.34 symbol is no longer
neded because this commit makes __pthread_mutex_destroy@GLIBC_2.0
a compatibility symbol, so remove the new symbol version.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:15 +02:00
Florian Weimer
cf3fff1c19 nptl: Move cnd_wait into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_wait@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:10 +02:00
Florian Weimer
08a31ef923 nptl: Move cnd_timedwait into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_timedwait@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:15:04 +02:00
Florian Weimer
eef936eb45 nptl: Move cnd_signal into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_signal@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:14:49 +02:00
Florian Weimer
3eab466e56 nptl: Move cnd_init into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_init@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:14:38 +02:00
Florian Weimer
f11c293a4c nptl: Move cnd_destroy into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_destroy@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:14:28 +02:00
Florian Weimer
0431f171da nptl: Move cnd_broadcast into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_broadcast@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:14:17 +02:00
Florian Weimer
575295fc83 nptl: Move call_once into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

This change also turns __pthread_once into a compatibility symbol
because after the call_once move, an internal call to __pthread_once
can be used.  This an adjustment to __libc_once: Outside libc (e.g.,
in nscd), it has to call pthread_once.  With __pthread_once as a
compatibility symbol, it is no longer to add a new GLIBC_2.34
version after the move from libpthread, and this commit removes
the new __pthread_once@@GLIBC_2.34 version.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03 08:14:01 +02:00
Martin Sebor
b25b067491 Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning. 2021-04-27 19:07:49 -06:00
Martin Sebor
a1561c3bbe Add __attribute_access_none to disable GCC warnings [BZ #27714]
GCC 11 warns when a pointer to an uninitialized object is passed
to a function that takes a const-qualified argument.  This is done
on the assumption that most such functions read from the object.
For the rare case of a function that doesn't, GCC 11 extends
attribute access to add a new mode called none.

POSIX pthread_setspecific() is one such rare function that takes
a const void* argument but that doesn't read from the object it
points to.  To suppress the -Wmaybe-uninitialized issued by GCC
11 when the address of an uninitialized object is passed to it
(e.g., the result of malloc()), this change #defines
__attr_access_none in cdefs.h and uses the macro on the function
in sysdeps/htl/pthread.h and sysdeps/nptl/pthread.h.
2021-04-27 13:01:55 -06:00
Florian Weimer
24f261f27f nptl: Remove __h_errno_location from libpthread
The existing definition in libc will be used instead.

The symbol was moved (that is, removed) using
scripts/move-symbol-to-libc.py.
2021-04-23 18:08:38 +02:00
Florian Weimer
2b6a4307e9 nptl: Remove __res_state from libpthread
The existing definition in libc will be used instead.

The symbol was moved (that is, removed) using
scripts/move-symbol-to-libc.py.
2021-04-23 18:08:37 +02:00
Florian Weimer
4baf02b332 nptl: Move pthread_spin_trylock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 17:06:48 +02:00
Florian Weimer
da8e3710d8 nptl: Move pthread_spin_lock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 17:06:46 +02:00
Florian Weimer
ce4b3b7bef nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc
For some architectures, the two functions are aliased, so these
symbols need to be moved at the same time.

The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23 17:06:44 +02:00
Florian Weimer
c7b1cd4ad1 nptl: Move pthread_spin_destroy into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 17:06:42 +02:00
Florian Weimer
d9b600c985 nptl: Move pthread_condattr_setpshared into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 11:17:10 +02:00
Florian Weimer
6a75fefc2c nptl: Move pthread_condattr_setclock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 11:02:54 +02:00
Florian Weimer
2a775a9ea5 nptl: Move pthread_condattr_getpshared into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 11:00:53 +02:00
Florian Weimer
ed00dcbbd6 nptl: Move pthread_condattr_getclock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 10:55:07 +02:00
Florian Weimer
b76c066d09 nptl: Move pthread_mutexattr_settype, __pthread_mutexattr_settype into libc
And pthread_mutexattr_setkind_np as a compatibility symbol.

__pthread_mutexattr_settype is used in mtx_init from libpthread,
so this commit adds a GLIBC_2.34 symbol version for it.

The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23 09:51:57 +02:00
Florian Weimer
1ec4cd5ab4 nptl: Move pthread_mutexattr_setrobust into libc
And pthread_mutexattr_getrobust_np as a compat symbol.

The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23 09:51:57 +02:00