diff options
| author | gfleury <gfleury@disroot.org> | 2024-11-26 22:53:28 +0200 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-09 02:03:18 +0100 |
| commit | 5ccb28e65da8380e2f6b0b8ed025c59c9713d863 (patch) | |
| tree | 8102eeda5a19930f839d599dd8bcb458dfae0c24 /sysdeps/htl/pt-condattr-setclock.c | |
| parent | ebd85cdc4ad93a7dfff17fcffaf84336fdd676ce (diff) | |
| download | glibc-5ccb28e65da8380e2f6b0b8ed025c59c9713d863.tar.xz glibc-5ccb28e65da8380e2f6b0b8ed025c59c9713d863.zip | |
htl: move pthread_condattr_setclock into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-7-gfleury@disroot.org>
Diffstat (limited to 'sysdeps/htl/pt-condattr-setclock.c')
| -rw-r--r-- | sysdeps/htl/pt-condattr-setclock.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/htl/pt-condattr-setclock.c b/sysdeps/htl/pt-condattr-setclock.c index d79cc5822e..337876434d 100644 --- a/sysdeps/htl/pt-condattr-setclock.c +++ b/sysdeps/htl/pt-condattr-setclock.c @@ -17,10 +17,11 @@ <https://www.gnu.org/licenses/>. */ #include <pthread.h> +#include <shlib-compat.h> #include <pt-internal.h> int -pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) +__pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) { /* Only a few clocks are allowed. CLOCK_REALTIME is always allowed. CLOCK_MONOTONIC only if the kernel has the necessary support. */ @@ -34,7 +35,7 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) struct timespec ts; int res; - res = clock_gettime (CLOCK_MONOTONIC, &ts); + res = __clock_gettime (CLOCK_MONOTONIC, &ts); avail = res < 0 ? -1 : 1; } @@ -49,3 +50,8 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) return 0; } +versioned_symbol (libc, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_12); +#endif |
