tst-timerfd tst-ppoll \
tst-clock_adjtime tst-adjtimex tst-ntp_adjtime tst-ntp_gettime \
tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone \
- tst-close_range
+ tst-close_range \
+ tst-prctl \
+ # tests
# Test for the symbol version of fcntl that was replaced in glibc 2.28.
ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
tst-ppoll-time64 \
tst-sigtimedwait-time64 \
tst-timerfd-time64 \
+ tst-prctl-time64 \
+ # tests-time64
tests-clone-internal = \
tst-align-clone-internal \
__ntp_gettime64;
__ntp_gettimex64;
__ppoll64;
+ __prctl_time64;
__pselec64;
__pselect64;
__pthread_clockjoin_np64;
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
libc_hidden_def (__prctl)
weak_alias (__prctl, prctl)
+#if __TIMESIZE != 64
+weak_alias (__prctl, __prctl_time64)
+#endif
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
GLIBC_2.34 __ntp_gettime64 F
GLIBC_2.34 __ntp_gettimex64 F
GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
GLIBC_2.34 __pselect64 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_clockjoin_np64 F
__BEGIN_DECLS
/* Control process execution. */
+#ifndef __USE_TIME_BITS64
extern int prctl (int __option, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
+# else
+extern int __prctl_time64 (int __option,d ...) __THROW;
+# define ioctl __prctl_time64
+# endif
+#endif
+
__END_DECLS
--- /dev/null
+#include "tst-prctl.c"
--- /dev/null
+/* Smoke test for prctl.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sys/prctl.h>
+#include <support/check.h>
+
+static int
+do_test (void)
+{
+ TEST_COMPARE (prctl (PR_SET_NAME, "thread name", 0, 0, 0), 0);
+ char buffer[16] = { 0, };
+ TEST_COMPARE (prctl (PR_GET_NAME, buffer, 0, 0, 0), 0);
+ char expected[16] = "thread name";
+ TEST_COMPARE_BLOB (buffer, sizeof (buffer), expected, sizeof (expected));
+ return 0;
+}
+
+#include <support/test-driver.c>