[PATCH 05/19] htl: move __pthread_thread_{alloc, start, terminate} into libc.
gfleury
gfleury@disroot.org
Fri Aug 15 18:14:46 GMT 2025
---
htl/Makefile | 6 +++---
htl/Versions | 3 +++
htl/pt-internal.h | 4 +++-
sysdeps/mach/htl/pt-thread-alloc.c | 1 +
sysdeps/mach/htl/pt-thread-start.c | 1 +
sysdeps/mach/htl/pt-thread-terminate.c | 1 +
6 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/htl/Makefile b/htl/Makefile
index 88d02ca8..59fcab1e 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 \
@@ -210,6 +207,9 @@ routines := \
pt-stack-alloc \
pt-timedblock \
pt-timedblock-intr \
+ pt-thread-alloc \
+ pt-thread-start \
+ pt-thread-terminate \
pt-wakeup \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index 8d9dad88..c216db4b 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 28b77850..7651446b 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 3f840e40..020ff74b 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 65bc8d4a..64811e4d 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 58f265db..05ca3eda 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)
--
2.47.2
More information about the Libc-alpha
mailing list