diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 5 | ||||
-rw-r--r-- | nptl/pthread_rwlock_trywrlock.c | 15 |
3 files changed, 17 insertions, 5 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index fd0c9fa..a451f00 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -128,6 +128,7 @@ routines = \ pthread_rwlock_timedrdlock \ pthread_rwlock_timedwrlock \ pthread_rwlock_tryrdlock \ + pthread_rwlock_trywrlock \ pthread_rwlock_unlock \ pthread_rwlock_wrlock \ pthread_self \ @@ -185,7 +186,6 @@ libpthread-routines = \ pthread_getname \ pthread_join \ pthread_join_common \ - pthread_rwlock_trywrlock \ pthread_rwlockattr_destroy \ pthread_rwlockattr_getkind_np \ pthread_rwlockattr_getpshared \ diff --git a/nptl/Versions b/nptl/Versions index 97700cf..3e49406 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -70,6 +70,7 @@ libc { pthread_rwlock_init; pthread_rwlock_rdlock; pthread_rwlock_tryrdlock; + pthread_rwlock_trywrlock; pthread_rwlock_unlock; pthread_rwlock_wrlock; } @@ -78,6 +79,7 @@ libc { __pthread_rwlock_init; __pthread_rwlock_rdlock; __pthread_rwlock_tryrdlock; + __pthread_rwlock_trywrlock; __pthread_rwlock_unlock; __pthread_rwlock_wrlock; pthread_condattr_getpshared; @@ -221,6 +223,7 @@ libc { pthread_rwlock_timedrdlock; pthread_rwlock_timedwrlock; pthread_rwlock_tryrdlock; + pthread_rwlock_trywrlock; pthread_rwlock_unlock; pthread_rwlock_wrlock; pthread_setspecific; @@ -309,7 +312,6 @@ libpthread { pthread_attr_setstacksize; pthread_create; pthread_getconcurrency; - pthread_rwlock_trywrlock; pthread_rwlockattr_destroy; pthread_rwlockattr_getkind_np; pthread_rwlockattr_getpshared; @@ -336,7 +338,6 @@ libpthread { } GLIBC_2.2 { - __pthread_rwlock_trywrlock; pthread_attr_getstack; pthread_attr_setstack; pthread_barrier_destroy; diff --git a/nptl/pthread_rwlock_trywrlock.c b/nptl/pthread_rwlock_trywrlock.c index 642fa72..242c0a1 100644 --- a/nptl/pthread_rwlock_trywrlock.c +++ b/nptl/pthread_rwlock_trywrlock.c @@ -19,10 +19,11 @@ #include <errno.h> #include "pthreadP.h" #include <atomic.h> +#include <shlib-compat.h> /* See pthread_rwlock_common.c for an overview. */ int -__pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) +___pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) { /* When in a trywrlock, we can acquire the write lock if it is in states #1 (idle and read phase) and #5 (idle and write phase), and also in #6 @@ -64,5 +65,15 @@ __pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) } return EBUSY; } +versioned_symbol (libc, ___pthread_rwlock_trywrlock, + pthread_rwlock_trywrlock, GLIBC_2_34); +libc_hidden_ver (___pthread_rwlock_trywrlock, __pthread_rwlock_trywrlock) -strong_alias (__pthread_rwlock_trywrlock, pthread_rwlock_trywrlock) +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_rwlock_trywrlock, + pthread_rwlock_trywrlock, GLIBC_2_1); +#endif +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_rwlock_trywrlock, + __pthread_rwlock_trywrlock, GLIBC_2_2); +#endif |