aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-08-15 20:14:46 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-08-16 01:44:26 +0200
commitc3abc99cb0e154c0861ff7f3326da5970487f561 (patch)
treea328db75e5ca0ebe235f10d6b6536bff2102371a
parent450912d5dbcbdb0b34e71cd24d2a795e9674bd19 (diff)
downloadglibc-c3abc99cb0e154c0861ff7f3326da5970487f561.zip
glibc-c3abc99cb0e154c0861ff7f3326da5970487f561.tar.gz
glibc-c3abc99cb0e154c0861ff7f3326da5970487f561.tar.bz2
htl: move __pthread_thread_{alloc, start, terminate} into libc.
Message-ID: <20250815181500.107433-6-gfleury@disroot.org>
-rw-r--r--htl/Makefile6
-rw-r--r--htl/Versions3
-rw-r--r--htl/pt-internal.h4
-rw-r--r--sysdeps/mach/htl/pt-thread-alloc.c1
-rw-r--r--sysdeps/mach/htl/pt-thread-start.c1
-rw-r--r--sysdeps/mach/htl/pt-thread-terminate.c1
6 files changed, 12 insertions, 4 deletions
diff --git a/htl/Makefile b/htl/Makefile
index 88d02ca..e9fa141 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -37,9 +37,6 @@ libpthread-routines := \
pt-mutex-transfer-np \
pt-hurd-cond-wait \
pt-hurd-cond-timedwait \
- pt-thread-alloc \
- pt-thread-start \
- pt-thread-terminate \
pt-startup \
pt-docancel \
pt-sysdep \
@@ -208,6 +205,9 @@ routines := \
pt-sigstate \
pt-sigstate-destroy \
pt-stack-alloc \
+ pt-thread-alloc \
+ pt-thread-start \
+ pt-thread-terminate \
pt-timedblock \
pt-timedblock-intr \
pt-wakeup \
diff --git a/htl/Versions b/htl/Versions
index 8d9dad8..c216db4 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -248,6 +248,9 @@ libc {
__pthread_stack_alloc;
__pthread_timedblock;
__pthread_timedblock_intr;
+ __pthread_thread_alloc;
+ __pthread_thread_start;
+ __pthread_thread_terminate;
__pthread_wakeup;
}
}
diff --git a/htl/pt-internal.h b/htl/pt-internal.h
index 28b7785..7651446 100644
--- a/htl/pt-internal.h
+++ b/htl/pt-internal.h
@@ -247,9 +247,11 @@ extern int __pthread_setup (struct __pthread *__restrict thread,
/* Allocate a kernel thread (and any miscellaneous system dependent
resources) for THREAD; it must not be placed on the run queue. */
extern int __pthread_thread_alloc (struct __pthread *thread);
+libc_hidden_proto (__pthread_thread_alloc)
/* Start THREAD making it eligible to run. */
extern int __pthread_thread_start (struct __pthread *thread);
+libc_hidden_proto (__pthread_thread_start)
/* Terminate the kernel thread associated with THREAD, and deallocate its
stack as well as any other kernel resource associated with it.
@@ -263,7 +265,7 @@ extern int __pthread_thread_start (struct __pthread *thread);
has started, no other thread can terminate it, so that thread-local
variables created by that thread are correctly released. */
extern void __pthread_thread_terminate (struct __pthread *thread);
-
+libc_hidden_proto (__pthread_thread_terminate)
/* Called by a thread just before it calls the provided start
routine. */
diff --git a/sysdeps/mach/htl/pt-thread-alloc.c b/sysdeps/mach/htl/pt-thread-alloc.c
index 3f840e4..020ff74 100644
--- a/sysdeps/mach/htl/pt-thread-alloc.c
+++ b/sysdeps/mach/htl/pt-thread-alloc.c
@@ -92,3 +92,4 @@ __pthread_thread_alloc (struct __pthread *thread)
return 0;
}
+libc_hidden_def (__pthread_thread_alloc)
diff --git a/sysdeps/mach/htl/pt-thread-start.c b/sysdeps/mach/htl/pt-thread-start.c
index 65bc8d4..64811e4 100644
--- a/sysdeps/mach/htl/pt-thread-start.c
+++ b/sysdeps/mach/htl/pt-thread-start.c
@@ -51,3 +51,4 @@ __pthread_thread_start (struct __pthread *thread)
return 0;
}
+libc_hidden_def (__pthread_thread_start)
diff --git a/sysdeps/mach/htl/pt-thread-terminate.c b/sysdeps/mach/htl/pt-thread-terminate.c
index 58f265d..05ca3ed 100644
--- a/sysdeps/mach/htl/pt-thread-terminate.c
+++ b/sysdeps/mach/htl/pt-thread-terminate.c
@@ -91,3 +91,4 @@ __pthread_thread_terminate (struct __pthread *thread)
/* We are out of luck. */
assert_perror (err);
}
+libc_hidden_def (__pthread_thread_terminate)