aboutsummaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-25 10:30:36 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-25 11:49:55 +0200
commit1a7d0dedf0c579ff4c4146a861228bd381178905 (patch)
treeb656ae3faae17b9f36c6a2fff9dcd5861078bf45 /rt
parent3df6dcc5c75b40d0ac0a9d22967da0a5a2b8df5c (diff)
downloadglibc-1a7d0dedf0c579ff4c4146a861228bd381178905.zip
glibc-1a7d0dedf0c579ff4c4146a861228bd381178905.tar.gz
glibc-1a7d0dedf0c579ff4c4146a861228bd381178905.tar.bz2
Linux: Move aio_error, aio_error64 into libc
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'rt')
-rw-r--r--rt/Makefile2
-rw-r--r--rt/Versions6
-rw-r--r--rt/aio_error.c21
3 files changed, 22 insertions, 7 deletions
diff --git a/rt/Makefile b/rt/Makefile
index 75a4d1c..11924cd 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -29,7 +29,6 @@ routines = \
shm_unlink \
librt-routines = \
- aio_error \
aio_fsync \
aio_read \
aio_read64 \
@@ -60,6 +59,7 @@ librt-shared-only-routines = librt-compat
$(librt-routines-var) += \
aio_cancel \
+ aio_error \
aio_misc \
aio_notify \
aio_sigqueue \
diff --git a/rt/Versions b/rt/Versions
index 402a118..aae1d3c 100644
--- a/rt/Versions
+++ b/rt/Versions
@@ -4,6 +4,8 @@ libc {
aio_init;
aio_cancel;
aio_cancel64;
+ aio_error;
+ aio_error64;
%endif
}
GLIBC_2.2 {
@@ -15,6 +17,8 @@ libc {
aio_cancel;
aio_cancel64;
aio_init;
+ aio_error;
+ aio_error64;
%endif
shm_open;
shm_unlink;
@@ -38,9 +42,9 @@ librt {
%if !PTHREAD_IN_LIBC
aio_cancel;
aio_cancel64;
-%endif
aio_error;
aio_error64;
+%endif
aio_fsync;
aio_fsync64;
%if !PTHREAD_IN_LIBC
diff --git a/rt/aio_error.c b/rt/aio_error.c
index ed664ae..0e82283 100644
--- a/rt/aio_error.c
+++ b/rt/aio_error.c
@@ -29,20 +29,31 @@
#undef aio_error64
#include <aio_misc.h>
-
+#include <pthreadP.h>
+#include <shlib-compat.h>
int
-aio_error (const struct aiocb *aiocbp)
+__aio_error (const struct aiocb *aiocbp)
{
int ret;
/* Acquire the mutex to make sure all operations for this request are
complete. */
- pthread_mutex_lock(&__aio_requests_mutex);
+ __pthread_mutex_lock (&__aio_requests_mutex);
ret = aiocbp->__error_code;
- pthread_mutex_unlock(&__aio_requests_mutex);
+ __pthread_mutex_unlock (&__aio_requests_mutex);
return ret;
}
-weak_alias (aio_error, aio_error64)
+#if PTHREAD_IN_LIBC
+versioned_symbol (libc, __aio_error, aio_error, GLIBC_2_34);
+versioned_symbol (libc, __aio_error, aio_error64, GLIBC_2_34);
+# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (librt, __aio_error, aio_error, GLIBC_2_1);
+compat_symbol (librt, __aio_error, aio_error64, GLIBC_2_1);
+# endif
+#else /* !PTHREAD_IN_LIBC */
+strong_alias (__aio_error, aio_error)
+weak_alias (__aio_error, aio_error64)
+#endif /* !PTHREAD_IN_LIBC */