aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-08-17 12:40:22 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-08-18 01:06:41 +0200
commit098e449df01cd1db950030c09af667a2ee039460 (patch)
treeb02189de0a17e626a8cc77d9da75ec070e8eb9f7
parentf5a43420e24ebdaddde2afc3878da8b6f0c83362 (diff)
downloadglibc-098e449df01cd1db950030c09af667a2ee039460.zip
glibc-098e449df01cd1db950030c09af667a2ee039460.tar.gz
glibc-098e449df01cd1db950030c09af667a2ee039460.tar.bz2
htl: move sem_unlink into libc.
Message-ID: <20250817104023.91919-8-gfleury@disroot.org>
-rw-r--r--htl/Makefile2
-rw-r--r--htl/Versions4
-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
-rw-r--r--sysdeps/pthread/sem_unlink.c15
7 files changed, 14 insertions, 13 deletions
diff --git a/htl/Makefile b/htl/Makefile
index 56b29e6..979f290 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -34,7 +34,6 @@ libpthread-routines := \
pt-spin \
pt-getname-np \
pt-setname-np \
- sem_unlink \
cancellation \
cthreads-compat \
herrno \
@@ -211,6 +210,7 @@ routines := \
sem_close \
sem_open \
sem_routines \
+ sem_unlink \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index c22b1b0..f5ea540 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -109,6 +109,7 @@ libc {
sem_post;
sem_timedwait;
sem_trywait;
+ sem_unlink;
sem_wait;
}
@@ -239,6 +240,7 @@ libc {
sem_post;
sem_timedwait;
sem_trywait;
+ sem_unlink;
sem_wait;
}
@@ -332,8 +334,6 @@ libpthread {
pthread_create;
- sem_unlink;
-
pthread_spin_destroy; pthread_spin_init; pthread_spin_lock;
pthread_spin_trylock; pthread_spin_unlock;
__pthread_spin_destroy; __pthread_spin_init;
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 8eabddc..b3fe424 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -136,6 +136,7 @@ GLIBC_2.12 sem_open F
GLIBC_2.12 sem_post F
GLIBC_2.12 sem_timedwait F
GLIBC_2.12 sem_trywait F
+GLIBC_2.12 sem_unlink F
GLIBC_2.12 sem_wait F
GLIBC_2.13 __fentry__ F
GLIBC_2.14 syncfs F
@@ -2685,6 +2686,7 @@ GLIBC_2.43 sem_open F
GLIBC_2.43 sem_post F
GLIBC_2.43 sem_timedwait F
GLIBC_2.43 sem_trywait F
+GLIBC_2.43 sem_unlink F
GLIBC_2.43 sem_wait F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 483d792..a05cacf 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -24,7 +24,6 @@ GLIBC_2.12 pthread_spin_init F
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_unlink F
GLIBC_2.2.6 _IO_flockfile F
GLIBC_2.2.6 _IO_ftrylockfile F
GLIBC_2.2.6 _IO_funlockfile F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index de42aca..56da3c5 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1768,6 +1768,7 @@ GLIBC_2.38 sem_open F
GLIBC_2.38 sem_post F
GLIBC_2.38 sem_timedwait F
GLIBC_2.38 sem_trywait F
+GLIBC_2.38 sem_unlink F
GLIBC_2.38 sem_wait F
GLIBC_2.38 semctl F
GLIBC_2.38 semget F
@@ -2366,6 +2367,7 @@ GLIBC_2.43 sem_open F
GLIBC_2.43 sem_post F
GLIBC_2.43 sem_timedwait F
GLIBC_2.43 sem_trywait F
+GLIBC_2.43 sem_unlink F
GLIBC_2.43 sem_wait F
HURD_CTHREADS_0.3 __cthread_getspecific F
HURD_CTHREADS_0.3 __cthread_keycreate F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 4c9ba3b..0b1dcf1 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -43,7 +43,6 @@ GLIBC_2.38 pthread_spin_init F
GLIBC_2.38 pthread_spin_lock F
GLIBC_2.38 pthread_spin_trylock F
GLIBC_2.38 pthread_spin_unlock F
-GLIBC_2.38 sem_unlink F
GLIBC_2.38 thrd_create F
GLIBC_2.38 thrd_detach F
GLIBC_2.38 thrd_exit F
diff --git a/sysdeps/pthread/sem_unlink.c b/sysdeps/pthread/sem_unlink.c
index 428a93a..bf09bfd 100644
--- a/sysdeps/pthread/sem_unlink.c
+++ b/sysdeps/pthread/sem_unlink.c
@@ -22,11 +22,7 @@
#include <unistd.h>
#include "semaphoreP.h"
#include <shm-directory.h>
-
-#if !PTHREAD_IN_LIBC
-/* The private name is not exported from libc. */
-# define __unlink unlink
-#endif
+#include <shlib-compat.h>
int
__sem_unlink (const char *name)
@@ -44,11 +40,14 @@ __sem_unlink (const char *name)
__set_errno (EACCES);
return ret;
}
-#if PTHREAD_IN_LIBC
+#ifndef __PTHREAD_HTL
versioned_symbol (libc, __sem_unlink, sem_unlink, GLIBC_2_34);
# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1_1, GLIBC_2_34)
compat_symbol (libpthread, __sem_unlink, sem_unlink, GLIBC_2_1_1);
# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__sem_unlink, sem_unlink)
+#else /* __PTHREAD_HTL */
+versioned_symbol (libc, __sem_unlink, sem_unlink, GLIBC_2_43);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libpthread, __sem_unlink, sem_unlink, GLIBC_2_12);
+#endif
#endif