1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

nptl: Move core mutex functions into libc

This is complicated because of a second compilation of
nptl/pthread_mutex_lock.c via nptl/pthread_mutex_cond_lock.c.
PTHREAD_MUTEX_VERSIONS is introduced to suppress symbol versions
in that case.

The symbols __pthread_mutex_lock, __pthread_mutex_unlock,
__pthread_mutex_init, __pthread_mutex_destroy, pthread_mutex_lock,
pthread_mutex_unlock, pthread_mutex_init, pthread_mutex_destroy
have been moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2021-04-21 19:49:51 +02:00
parent 60d5e40ab2
commit 27a448223c
73 changed files with 340 additions and 308 deletions

View File

@ -18,12 +18,12 @@
#include <errno.h>
#include "pthreadP.h"
#include <shlib-compat.h>
#include <stap-probe.h>
int
__pthread_mutex_destroy (pthread_mutex_t *mutex)
___pthread_mutex_destroy (pthread_mutex_t *mutex)
{
LIBC_PROBE (mutex_destroy, 1, mutex);
@ -41,5 +41,13 @@ __pthread_mutex_destroy (pthread_mutex_t *mutex)
return 0;
}
weak_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
hidden_def (__pthread_mutex_destroy)
versioned_symbol (libc, ___pthread_mutex_destroy, __pthread_mutex_destroy,
GLIBC_2_34);
libc_hidden_ver (___pthread_mutex_destroy, __pthread_mutex_destroy)
versioned_symbol (libc, ___pthread_mutex_destroy, pthread_mutex_destroy,
GLIBC_2_0);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
compat_symbol (libpthread, ___pthread_mutex_destroy, __pthread_mutex_destroy,
GLIBC_2_0);
#endif