htl: move __pthread_thread_{alloc, start, terminate} into libc.

Message-ID: <20250815181500.107433-6-gfleury@disroot.org>
This commit is contained in:
gfleury 2025-08-15 20:14:46 +02:00 committed by Samuel Thibault
parent 450912d5db
commit c3abc99cb0
6 changed files with 12 additions and 4 deletions

View File

@ -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 \

View File

@ -248,6 +248,9 @@ libc {
__pthread_stack_alloc;
__pthread_timedblock;
__pthread_timedblock_intr;
__pthread_thread_alloc;
__pthread_thread_start;
__pthread_thread_terminate;
__pthread_wakeup;
}
}

View File

@ -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. */

View File

@ -92,3 +92,4 @@ __pthread_thread_alloc (struct __pthread *thread)
return 0;
}
libc_hidden_def (__pthread_thread_alloc)

View File

@ -51,3 +51,4 @@ __pthread_thread_start (struct __pthread *thread)
return 0;
}
libc_hidden_def (__pthread_thread_start)

View File

@ -91,3 +91,4 @@ __pthread_thread_terminate (struct __pthread *thread)
/* We are out of luck. */
assert_perror (err);
}
libc_hidden_def (__pthread_thread_terminate)