aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-08-17 12:40:17 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-08-18 00:22:53 +0200
commit11c07af422db200d0f5054a5353ba52cef6434cf (patch)
tree322eab47a0c45fbd4b67ab92a118d3ec8b5770c3
parentc2560a0c5622ac4a559a1267eaedcfbb532202ca (diff)
downloadglibc-11c07af422db200d0f5054a5353ba52cef6434cf.zip
glibc-11c07af422db200d0f5054a5353ba52cef6434cf.tar.gz
glibc-11c07af422db200d0f5054a5353ba52cef6434cf.tar.bz2
htl: move sem_getvalue into libc.
Message-ID: <20250817104023.91919-3-gfleury@disroot.org>
-rw-r--r--htl/Makefile2
-rw-r--r--htl/Versions4
-rw-r--r--sysdeps/htl/sem-getvalue.c6
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist2
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist1
-rw-r--r--sysdeps/mach/hurd/x86_64/libc.abilist2
-rw-r--r--sysdeps/mach/hurd/x86_64/libpthread.abilist1
7 files changed, 13 insertions, 5 deletions
diff --git a/htl/Makefile b/htl/Makefile
index e4a3adc..8991a31 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -35,7 +35,6 @@ libpthread-routines := \
pt-getname-np \
pt-setname-np \
sem_close \
- sem-getvalue \
sem-init \
sem_open \
sem-post \
@@ -211,6 +210,7 @@ routines := \
pt-wakeup \
pt-yield \
sem-destroy \
+ sem-getvalue \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index 48e7fce..5ede53d 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -102,6 +102,7 @@ libc {
pthread_testcancel;
pthread_yield;
sem_destroy;
+ sem_getvalue;
}
GLIBC_2.21 {
@@ -221,6 +222,7 @@ libc {
pthread_tryjoin_np;
pthread_yield;
sem_destroy;
+ sem_getvalue;
}
GLIBC_PRIVATE {
@@ -313,7 +315,7 @@ libpthread {
pthread_create;
- sem_close; sem_getvalue; sem_init; sem_open; sem_post;
+ sem_close; sem_init; sem_open; sem_post;
sem_timedwait; sem_trywait; sem_unlink; sem_wait;
pthread_spin_destroy; pthread_spin_init; pthread_spin_lock;
diff --git a/sysdeps/htl/sem-getvalue.c b/sysdeps/htl/sem-getvalue.c
index a1f7bca..799ddac 100644
--- a/sysdeps/htl/sem-getvalue.c
+++ b/sysdeps/htl/sem-getvalue.c
@@ -18,6 +18,7 @@
#include <semaphore.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
int
__sem_getvalue (sem_t *restrict sem, int *restrict value)
@@ -33,4 +34,7 @@ __sem_getvalue (sem_t *restrict sem, int *restrict value)
return 0;
}
-strong_alias (__sem_getvalue, sem_getvalue);
+versioned_symbol (libc, __sem_getvalue, sem_getvalue, GLIBC_2_43);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libpthread, __sem_getvalue, sem_getvalue, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 80bf640..74f1fc9 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -129,6 +129,7 @@ GLIBC_2.12 pthread_sigmask F
GLIBC_2.12 pthread_testcancel F
GLIBC_2.12 pthread_yield F
GLIBC_2.12 sem_destroy F
+GLIBC_2.12 sem_getvalue F
GLIBC_2.13 __fentry__ F
GLIBC_2.14 syncfs F
GLIBC_2.15 __fdelt_chk F
@@ -2668,6 +2669,7 @@ GLIBC_2.43 pthread_timedjoin_np F
GLIBC_2.43 pthread_tryjoin_np F
GLIBC_2.43 pthread_yield F
GLIBC_2.43 sem_destroy F
+GLIBC_2.43 sem_getvalue F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 99fdf00..310f7ec 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -25,7 +25,6 @@ GLIBC_2.12 pthread_spin_lock F
GLIBC_2.12 pthread_spin_trylock F
GLIBC_2.12 pthread_spin_unlock F
GLIBC_2.12 sem_close F
-GLIBC_2.12 sem_getvalue F
GLIBC_2.12 sem_init F
GLIBC_2.12 sem_open F
GLIBC_2.12 sem_post F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index b3d402f..dd18c69 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1760,6 +1760,7 @@ GLIBC_2.38 seed48_r F
GLIBC_2.38 seekdir F
GLIBC_2.38 select F
GLIBC_2.38 sem_destroy F
+GLIBC_2.38 sem_getvalue F
GLIBC_2.38 semctl F
GLIBC_2.38 semget F
GLIBC_2.38 semop F
@@ -2349,6 +2350,7 @@ GLIBC_2.43 pthread_timedjoin_np F
GLIBC_2.43 pthread_tryjoin_np F
GLIBC_2.43 pthread_yield F
GLIBC_2.43 sem_destroy F
+GLIBC_2.43 sem_getvalue F
HURD_CTHREADS_0.3 __cthread_getspecific F
HURD_CTHREADS_0.3 __cthread_keycreate F
HURD_CTHREADS_0.3 __cthread_setspecific F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index a03bebd..41c18cc 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -45,7 +45,6 @@ GLIBC_2.38 pthread_spin_trylock F
GLIBC_2.38 pthread_spin_unlock F
GLIBC_2.38 sem_clockwait F
GLIBC_2.38 sem_close F
-GLIBC_2.38 sem_getvalue F
GLIBC_2.38 sem_init F
GLIBC_2.38 sem_open F
GLIBC_2.38 sem_post F