aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-28 09:51:01 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-28 09:51:01 +0200
commit30639e79d3370243ee5ef3a029204a4c71e15856 (patch)
tree4e3f8d5501fbcb5ab1155a3a6cd7f8161863055c /sysdeps
parent477910b83e5ef3b3aa78b11808433846989461c8 (diff)
downloadglibc-30639e79d3370243ee5ef3a029204a4c71e15856.zip
glibc-30639e79d3370243ee5ef3a029204a4c71e15856.tar.gz
glibc-30639e79d3370243ee5ef3a029204a4c71e15856.tar.bz2
Linux: Cleanups after librt move
librt.so is no longer installed for PTHREAD_IN_LIBC, and tests are not linked against it. $(librt) is introduced globally for shared tests that need to be linked for both PTHREAD_IN_LIBC and !PTHREAD_IN_LIBC. GLIBC_PRIVATE symbols that were needed during the transition are removed again. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/aio_misc.h43
-rw-r--r--sysdeps/htl/Makeconfig6
-rw-r--r--sysdeps/nptl/Makeconfig1
-rw-r--r--sysdeps/pthread/Makefile14
-rw-r--r--sysdeps/unix/sysv/linux/Makefile13
-rw-r--r--sysdeps/unix/sysv/linux/Versions6
-rw-r--r--sysdeps/unix/sysv/linux/aio_sigqueue.c1
-rw-r--r--sysdeps/unix/sysv/linux/kernel-posix-timers.h17
-rw-r--r--sysdeps/unix/sysv/linux/timer_create.c3
-rw-r--r--sysdeps/unix/sysv/linux/timer_routines.c10
10 files changed, 31 insertions, 83 deletions
diff --git a/sysdeps/generic/aio_misc.h b/sysdeps/generic/aio_misc.h
index d9bff36..4d05b8c 100644
--- a/sysdeps/generic/aio_misc.h
+++ b/sysdeps/generic/aio_misc.h
@@ -87,55 +87,36 @@ struct requestlist
/* Lock for global I/O list of requests. */
-extern pthread_mutex_t __aio_requests_mutex;
+extern pthread_mutex_t __aio_requests_mutex attribute_hidden;
/* Enqueue request. */
extern struct requestlist *__aio_enqueue_request (aiocb_union *aiocbp,
- int operation);
+ int operation)
+ attribute_hidden;
/* Find request entry for given AIO control block. */
-extern struct requestlist *__aio_find_req (aiocb_union *elem);
+extern struct requestlist *__aio_find_req (aiocb_union *elem) attribute_hidden;
/* Find request entry for given file descriptor. */
-extern struct requestlist *__aio_find_req_fd (int fildes);
+extern struct requestlist *__aio_find_req_fd (int fildes) attribute_hidden;
/* Remove request from the list. */
extern void __aio_remove_request (struct requestlist *last,
- struct requestlist *req, int all);
+ struct requestlist *req, int all)
+ attribute_hidden;
/* Release the entry for the request. */
-extern void __aio_free_request (struct requestlist *req);
+extern void __aio_free_request (struct requestlist *req) attribute_hidden;
/* Notify initiator of request and tell this everybody listening. */
-extern void __aio_notify (struct requestlist *req);
+extern void __aio_notify (struct requestlist *req) attribute_hidden;
/* Notify initiator of request. */
-extern int __aio_notify_only (struct sigevent *sigev);
+extern int __aio_notify_only (struct sigevent *sigev) attribute_hidden;
/* Send the signal. */
-extern int __aio_sigqueue (int sig, const union sigval val, pid_t caller_pid);
-
-#if PTHREAD_IN_LIBC
-libc_hidden_proto (__aio_enqueue_request)
-libc_hidden_proto (__aio_find_req)
-libc_hidden_proto (__aio_find_req_fd)
-libc_hidden_proto (__aio_free_request)
-libc_hidden_proto (__aio_notify)
-libc_hidden_proto (__aio_notify_only)
-libc_hidden_proto (__aio_remove_request)
-libc_hidden_proto (__aio_requests_mutex)
-libc_hidden_proto (__aio_sigqueue)
-#else
-librt_hidden_proto (__aio_enqueue_request)
-librt_hidden_proto (__aio_find_req)
-librt_hidden_proto (__aio_find_req_fd)
-librt_hidden_proto (__aio_free_request)
-librt_hidden_proto (__aio_notify)
-librt_hidden_proto (__aio_notify_only)
-librt_hidden_proto (__aio_remove_request)
-librt_hidden_proto (__aio_requests_mutex)
-librt_hidden_proto (__aio_sigqueue)
-#endif
+extern int __aio_sigqueue (int sig, const union sigval val, pid_t caller_pid)
+ attribute_hidden;
#endif /* aio_misc.h */
diff --git a/sysdeps/htl/Makeconfig b/sysdeps/htl/Makeconfig
index e8a8f40..b5c5d62 100644
--- a/sysdeps/htl/Makeconfig
+++ b/sysdeps/htl/Makeconfig
@@ -7,4 +7,10 @@ shared-thread-library = $(common-objpfx)htl/libpthread.so
static-thread-library = $(..)htl/libpthread_syms.a $(common-objpfx)htl/libpthread.a
bounded-thread-library = $(static-thread-library)
+ifeq (yes,$(build-shared))
+librt = $(common-objpfx)rt/librt.so
+else
+librt = $(common-objpfx)rt/librt.a $(static-thread-library)
+endif
+
rpath-dirs += htl
diff --git a/sysdeps/nptl/Makeconfig b/sysdeps/nptl/Makeconfig
index 8a94079..613bd7b 100644
--- a/sysdeps/nptl/Makeconfig
+++ b/sysdeps/nptl/Makeconfig
@@ -24,6 +24,7 @@ have-thread-library = yes
# The thread library is integrated.
shared-thread-library =
static-thread-library =
+librt =
# Some tests need this to load their own test objects, and system
# libraries used by memusagestat need to link against the empty
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index fedb785..9b862b9 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -17,13 +17,7 @@
# <https://www.gnu.org/licenses/>.
ifeq ($(subdir),rt)
-
-ifeq (yes,$(build-shared))
-$(objpfx)tst-timer: $(objpfx)librt.so $(shared-thread-library)
-else
-$(objpfx)tst-timer: $(objpfx)librt.a $(static-thread-library)
-endif
-
+$(objpfx)tst-timer: $(librt)
endif
ifneq (,$(filter $(subdir),htl nptl))
@@ -232,12 +226,10 @@ $(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
$(objpfx)tst-cleanup0-cmp.out: $(..)sysdeps/pthread/tst-cleanup0.expect $(objpfx)tst-cleanup0.out
cmp $^ > $@; \
$(evaluate-test)
-
-$(objpfx)tst-cancel28: $(common-objpfx)rt/librt.so
-else
-$(objpfx)tst-cancel28: $(common-objpfx)rt/librt.a
endif
+$(objpfx)tst-cancel28: $(librt)
+
$(objpfx)tst-fini1: $(shared-thread-library) $(objpfx)tst-fini1mod.so
$(objpfx)tst-fini1mod.so: $(shared-thread-library)
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 88d7cd7..faea02b 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -137,19 +137,6 @@ tests-time64 += \
CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
-ifeq (yes,$(build-shared))
-librt = $(common-objpfx)rt/librt.so
-else
-librt = $(common-objpfx)rt/librt.a
-endif
-
-$(objpfx)tst-ppoll: $(librt)
-$(objpfx)tst-ppoll-time64: $(librt)
-$(objpfx)tst-sigtimedwait: $(librt)
-$(objpfx)tst-sigtimedwait-time64: $(librt)
-$(objpfx)tst-timerfd: $(librt)
-$(objpfx)tst-timerfd-time64: $(librt)
-
# Generate the list of SYS_* macros for the system calls (__NR_*
# macros). The file syscall-names.list contains all possible system
# call names, and the generated header file produces SYS_* macros for
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 578d55e..29ed245 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -291,12 +291,6 @@ libc {
__pread64_nocancel;
__close_nocancel;
__sigtimedwait;
- __timer_active_sigev_thread;
- __timer_active_sigev_thread_lock;
- __timer_compat_list;
- __timer_helper_once;
- __timer_helper_tid;
- __timer_start_helper_thread;
# functions used by nscd
__netlink_assert_response;
}
diff --git a/sysdeps/unix/sysv/linux/aio_sigqueue.c b/sysdeps/unix/sysv/linux/aio_sigqueue.c
index bd0da6e..0b0f347 100644
--- a/sysdeps/unix/sysv/linux/aio_sigqueue.c
+++ b/sysdeps/unix/sysv/linux/aio_sigqueue.c
@@ -44,4 +44,3 @@ __aio_sigqueue (int sig, const union sigval val, pid_t caller_pid)
return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, sig, &info);
}
-libc_hidden_def (__aio_sigqueue)
diff --git a/sysdeps/unix/sysv/linux/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/kernel-posix-timers.h
index 5799c1e..9109166 100644
--- a/sysdeps/unix/sysv/linux/kernel-posix-timers.h
+++ b/sysdeps/unix/sysv/linux/kernel-posix-timers.h
@@ -26,27 +26,23 @@
extern int __no_posix_timers attribute_hidden;
/* Callback to start helper thread. */
-extern void __timer_start_helper_thread (void);
-libc_hidden_proto (__timer_start_helper_thread)
+extern void __timer_start_helper_thread (void) attribute_hidden;
/* Control variable for helper thread creation. */
-extern pthread_once_t __timer_helper_once;
-libc_hidden_proto (__timer_helper_once)
+extern pthread_once_t __timer_helper_once attribute_hidden;
/* Called from fork so that the new subprocess re-creates the
notification thread if necessary. */
void __timer_fork_subprocess (void) attribute_hidden;
/* TID of the helper thread. */
-extern pid_t __timer_helper_tid;
-libc_hidden_proto (__timer_helper_tid)
+extern pid_t __timer_helper_tid attribute_hidden;
/* List of active SIGEV_THREAD timers. */
-extern struct timer *__timer_active_sigev_thread;
-libc_hidden_proto (__timer_active_sigev_thread)
+extern struct timer *__timer_active_sigev_thread attribute_hidden;
+
/* Lock for __timer_active_sigev_thread. */
-extern pthread_mutex_t __timer_active_sigev_thread_lock;
-libc_hidden_proto (__timer_active_sigev_thread_lock)
+extern pthread_mutex_t __timer_active_sigev_thread_lock attribute_hidden;
extern __typeof (timer_create) __timer_create;
libc_hidden_proto (__timer_create)
@@ -118,5 +114,4 @@ timerid_to_kernel_timer (timer_t timerid)
#if TIMER_T_WAS_INT_COMPAT
# define OLD_TIMER_MAX 256
extern timer_t __timer_compat_list[OLD_TIMER_MAX];
-libc_hidden_proto (__timer_compat_list)
#endif
diff --git a/sysdeps/unix/sysv/linux/timer_create.c b/sysdeps/unix/sysv/linux/timer_create.c
index 58099e3..fb904a8 100644
--- a/sysdeps/unix/sysv/linux/timer_create.c
+++ b/sysdeps/unix/sysv/linux/timer_create.c
@@ -146,8 +146,7 @@ compat_symbol (librt, ___timer_create, timer_create, GLIBC_2_3_3);
# endif
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
-timer_t __timer_compat_list[OLD_TIMER_MAX] __attribute__ ((nocommon));
-libc_hidden_data_def (__timer_compat_list)
+timer_t __timer_compat_list[OLD_TIMER_MAX];
int
__timer_create_old (clockid_t clock_id, struct sigevent *evp, int *timerid)
diff --git a/sysdeps/unix/sysv/linux/timer_routines.c b/sysdeps/unix/sysv/linux/timer_routines.c
index e0bb169..30ad32b 100644
--- a/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/sysdeps/unix/sysv/linux/timer_routines.c
@@ -26,13 +26,10 @@
/* List of active SIGEV_THREAD timers. */
-struct timer *__timer_active_sigev_thread __attribute__ ((nocommon));
-libc_hidden_data_def (__timer_active_sigev_thread)
+struct timer *__timer_active_sigev_thread;
/* Lock for _timer_active_sigev_thread. */
-pthread_mutex_t __timer_active_sigev_thread_lock __attribute__ ((nocommon))
- = PTHREAD_MUTEX_INITIALIZER;
-libc_hidden_data_def (__timer_active_sigev_thread_lock)
+pthread_mutex_t __timer_active_sigev_thread_lock = PTHREAD_MUTEX_INITIALIZER;
struct thread_start_data
{
@@ -112,12 +109,10 @@ timer_helper_thread (void *arg)
/* Control variable for helper thread creation. */
pthread_once_t __timer_helper_once __attribute__ ((nocommon))
= PTHREAD_ONCE_INIT;
-libc_hidden_data_def (__timer_helper_once)
/* TID of the helper thread. */
pid_t __timer_helper_tid __attribute__ ((nocommon));
-libc_hidden_data_def (__timer_helper_tid)
/* Reset variables so that after a fork a new helper thread gets started. */
@@ -159,4 +154,3 @@ __timer_start_helper_thread (void)
/* No need for the attribute anymore. */
__pthread_attr_destroy (&attr);
}
-libc_hidden_def (__timer_start_helper_thread)