aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-08-17 12:40:18 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-08-18 00:23:11 +0200
commitb2b6d32f11bad38e1ec036f5127f703ca29560aa (patch)
tree9396e8d2229a86fd1103f9b6b03c0712b88ea111
parent11c07af422db200d0f5054a5353ba52cef6434cf (diff)
downloadglibc-b2b6d32f11bad38e1ec036f5127f703ca29560aa.zip
glibc-b2b6d32f11bad38e1ec036f5127f703ca29560aa.tar.gz
glibc-b2b6d32f11bad38e1ec036f5127f703ca29560aa.tar.bz2
htl: move sem_init into libc.
Message-ID: <20250817104023.91919-4-gfleury@disroot.org>
-rw-r--r--htl/Makefile2
-rw-r--r--htl/Versions4
-rw-r--r--sysdeps/htl/sem-init.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 8991a31..33dfdc5 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -35,7 +35,6 @@ libpthread-routines := \
pt-getname-np \
pt-setname-np \
sem_close \
- sem-init \
sem_open \
sem-post \
sem-timedwait \
@@ -211,6 +210,7 @@ routines := \
pt-yield \
sem-destroy \
sem-getvalue \
+ sem-init \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index 5ede53d..764faa0 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -103,6 +103,7 @@ libc {
pthread_yield;
sem_destroy;
sem_getvalue;
+ sem_init;
}
GLIBC_2.21 {
@@ -223,6 +224,7 @@ libc {
pthread_yield;
sem_destroy;
sem_getvalue;
+ sem_init;
}
GLIBC_PRIVATE {
@@ -315,7 +317,7 @@ libpthread {
pthread_create;
- sem_close; sem_init; sem_open; sem_post;
+ sem_close; 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-init.c b/sysdeps/htl/sem-init.c
index 952be42..e818c07 100644
--- a/sysdeps/htl/sem-init.c
+++ b/sysdeps/htl/sem-init.c
@@ -21,6 +21,7 @@
#include <hurd.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
int
__sem_init (sem_t *sem, int pshared, unsigned value)
@@ -36,4 +37,7 @@ __sem_init (sem_t *sem, int pshared, unsigned value)
return 0;
}
-strong_alias (__sem_init, sem_init);
+versioned_symbol (libc, __sem_init, sem_init, GLIBC_2_43);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libpthread, __sem_init, sem_init, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 74f1fc9..02bc296 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -130,6 +130,7 @@ 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.12 sem_init F
GLIBC_2.13 __fentry__ F
GLIBC_2.14 syncfs F
GLIBC_2.15 __fdelt_chk F
@@ -2670,6 +2671,7 @@ 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.43 sem_init 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 310f7ec..8d04328 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_init F
GLIBC_2.12 sem_open F
GLIBC_2.12 sem_post F
GLIBC_2.12 sem_timedwait F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index dd18c69..3fc4337 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1761,6 +1761,7 @@ 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 sem_init F
GLIBC_2.38 semctl F
GLIBC_2.38 semget F
GLIBC_2.38 semop F
@@ -2351,6 +2352,7 @@ 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.43 sem_init 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 41c18cc..a612aa9 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_init F
GLIBC_2.38 sem_open F
GLIBC_2.38 sem_post F
GLIBC_2.38 sem_timedwait F