Commit Graph

215 Commits

Author SHA1 Message Date
Samuel Thibault ff92750112 htl: Move pthread_atfork compatibility symbol to libc
There is no new symbol version because of the compatibility symbol
status.
2025-11-21 00:29:44 +01:00
gfleury b36a126f7d htl: move pthread_spin_{destroy, lock, init, trylock, unlock) and remove _pthread_spin_lock, into libc.
Message-ID: <20251120085647.326643-1-gfleury@disroot.org>
2025-11-21 00:29:44 +01:00
gfleury d989840693 htl: move pthread_hurd_cond_timedwait_np, pthread_hurd_cond_wait_np into libc.
Message-ID: <20251118125044.1160780-3-gfleury@disroot.org>
2025-11-18 15:01:35 +01:00
gfleury bb3524a879 htl: move pthread_getname_np/setname_np into libc.
Message-ID: <20251118125044.1160780-2-gfleury@disroot.org>
2025-11-18 15:01:35 +01:00
gfleury 77f446346a htl: fix compatibility
This fix 91fb9914d8 which break a system
built with an old glibc
Message-ID: <20251118125044.1160780-1-gfleury@disroot.org>
2025-11-18 15:01:35 +01:00
Samuel Thibault 5b6ee0e0ba htl: move pthread_create to into libc
This is notably needed for the main thread structure to be always
initialized so that some pthread functions can work from the main thread
without other threads, e.g. pthread_cancel.
2025-11-17 00:38:37 +00:00
Samuel Thibault f63dd92431 htl: Move __pthread_enable/disable_asynccancel into libc
This is actually needed before we make pthread_cancel available in libc.
2025-11-17 00:38:36 +00:00
Adhemerval Zanella 7fec8a5de6 Revert __HAVE_64B_ATOMICS configure check
The 53807741fb added a configure check
for 64-bit atomic operations that were not previously enabled on some
32-bit ABIs.

However, the NPTL semaphore code casts a sem_t to a new_sem and issues
a 64-bit atomic operation for __HAVE_64B_ATOMICS.  Since sem_t has
32-bit alignment on 32-bit architectures, this prevents the use of
64-bit atomics even if the ABI supports them.

Assume 64-bit atomic support from __WORDSIZE, which maps to how glibc
defines it before the broken change.  Also rename __HAVE_64B_ATOMICS
to USE_64B_ATOMICS to define better the flag meaning.

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-11-14 14:05:20 -03:00
Samuel Thibault 91fb9914d8 htl: Remove errno and herrno from libpthread
libc already has them.
2025-11-13 23:45:42 +01:00
Samuel Thibault 23b8e6ae4f htl: Drop pthread-functions infrastructure
All previously forwarded functions are now called directly (either via local
call in libc, or through a __export).t
2025-11-13 23:23:13 +01:00
Samuel Thibault 6c933807a9 htl: Move __pthread_cleanup_stack out of libc_pthread_init.c
It does not actually need to be extern any more.
2025-11-13 23:22:57 +01:00
Samuel Thibault f6a60e9867 htl: move {,_IO_}f{,un,try}lockfile implementation into libc 2025-11-13 23:01:07 +01:00
Samuel Thibault f851a74346 hurd: Drop remnants of cthreads
These are not used in GNU/Hurd since very long now.
2025-11-12 01:11:11 +01:00
gfleury 098e449df0 htl: move sem_unlink into libc.
Message-ID: <20250817104023.91919-8-gfleury@disroot.org>
2025-08-18 01:06:41 +02:00
gfleury f5a43420e2 htl: move sem_{clockwait, timedwait, wait, trywait} into libc.
Message-ID: <20250817104023.91919-7-gfleury@disroot.org>
2025-08-18 01:06:38 +02:00
gfleury 795f5f2a8b htl: move sem_post into libc.
Message-ID: <20250817104023.91919-6-gfleury@disroot.org>
2025-08-18 00:55:33 +02:00
gfleury 50f5ddc20a htl: move sem_open, sem_close into libc.
Message-ID: <20250817104023.91919-5-gfleury@disroot.org>
2025-08-18 00:55:18 +02:00
gfleury b2b6d32f11 htl: move sem_init into libc.
Message-ID: <20250817104023.91919-4-gfleury@disroot.org>
2025-08-18 00:23:11 +02:00
gfleury 11c07af422 htl: move sem_getvalue into libc.
Message-ID: <20250817104023.91919-3-gfleury@disroot.org>
2025-08-18 00:22:53 +02:00
gfleury c2560a0c56 htl: move sem_destroy into libc.
Message-ID: <20250817104023.91919-2-gfleury@disroot.org>
2025-08-18 00:22:43 +02:00
gfleury 35296a6e73 htl: move __pthread_startup into libc.
Message-ID: <20250815181500.107433-20-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury 80412aee3e htl: move __pthread_setup into libc.
Message-ID: <20250815181500.107433-19-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury b6616efe8c htl: move pthread_{join, clockjoin_np, timedjoin_np, tryjoin_np} into libc.
Message-ID: <20250815181500.107433-18-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury 36982b0fdb htl: move pthread_exit into libc.
Message-ID: <20250815181500.107433-17-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury a901f2599e htl: move pthread_detach into libc.
Message-ID: <20250815181500.107433-16-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury d0667a77de htl: move __pthread_sigstate_init into libc.
Message-ID: <20250815181500.107433-15-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury f6a47e2d61 htl: move pthread_mutex_transfer_np into libc.
Message-ID: <20250815181500.107433-14-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury 1e6588e777 htl: move pthread_getattr_np into libc.
Message-ID: <20250815181500.107433-13-gfleury@disroot.org>
2025-08-16 01:44:51 +02:00
gfleury 6541288cb5 htl: move pthread_testcancel into libc.
Message-ID: <20250815181500.107433-12-gfleury@disroot.org>
2025-08-16 01:44:50 +02:00
gfleury edcc9ca48c htl: move pthread_kill into libc.
Message-ID: <20250815181500.107433-11-gfleury@disroot.org>
2025-08-16 01:44:27 +02:00
gfleury de8351f4de htl: move pthread_cancel, __pthread_do_cancel into libc.
Message-ID: <20250815181500.107433-10-gfleury@disroot.org>
2025-08-16 01:44:27 +02:00
gfleury e0b765d9ba htl: move __thread_set_pcsptp into libc.
Message-ID: <20250815181500.107433-9-gfleury@disroot.org>
2025-08-16 01:44:27 +02:00
gfleury 2dcb8fb8e7 htl: move pthread_yield into libc.
Message-ID: <20250815181500.107433-8-gfleury@disroot.org>
2025-08-16 01:44:27 +02:00
gfleury fa35ccbba8 htl: move pthread_getcpuclockid into libc.
Message-ID: <20250815181500.107433-7-gfleury@disroot.org>
2025-08-16 01:44:27 +02:00
gfleury c3abc99cb0 htl: move __pthread_thread_{alloc, start, terminate} into libc.
Message-ID: <20250815181500.107433-6-gfleury@disroot.org>
2025-08-16 01:44:26 +02:00
gfleury 450912d5db htl: move __pthread_stack_alloc into libc.
Message-ID: <20250815181500.107433-5-gfleury@disroot.org>
2025-08-16 01:15:37 +02:00
gfleury 2522a3f3ae htl: move __pthread_init_{specific, static_tls}, __pthread_{alloc}, dealloc} into libc.
Message-ID: <20250815181500.107433-4-gfleury@disroot.org>
2025-08-16 01:13:22 +02:00
gfleury b586357e2a htl: move pthread_get/setconcurrency into libc.
Message-ID: <20250815181500.107433-3-gfleury@disroot.org>
2025-08-16 01:12:21 +02:00
gfleury d479e71498 htl: move pthread_setschedprio into libc.
Message-ID: <20250815181500.107433-2-gfleury@disroot.org>
2025-08-16 01:11:21 +02:00
Samuel Thibault 6afece738c htl: move __pthread_get_cleanup_stack to libc
This fixes the cleanup call from __qsort_r
2025-07-06 19:56:15 +00:00
Samuel Thibault b80f108b55 htl: Drop ptr_pthread_once from pthread_functions
It is unused since ccdb68e829 ("htl: move pthread_once into libc")
2025-07-06 10:02:17 +00:00
gfleury 27360ab9ea htl: move pthread_key_*, pthread_get/setspecific
Signed-off-by: gfleury <gfleury@disroot.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-ID: <20250613184440.1660335-1-gfleury@disroot.org>
2025-06-15 21:21:12 +02:00
Samuel Thibault bfb2f2f481 htl: Make pthread_setcanceltype / state a cancellation point
as expected by tst-cancel32.
2025-03-15 19:45:55 +00:00
Samuel Thibault 4e68a5ca5d htl: Make __pthread_create_internal directly call __pthread_sigmask
__pthread_sigmask will already know to pass our current ss to
__sigthreadmask.
2025-03-06 02:28:35 +01:00
Samuel Thibault 81c4ec1ca8 htl: Make __pthread_sigmask directly call __sigthreadmask
If no thread was created yet, __pthread_sigstate will not find our ss
because self->kernel_thread is still nul, and then change the global
sigstate instead of our sigstate! We can directly call __sigthreadmask and
skip the (bogus) lookup step.
2025-03-06 02:28:35 +01:00
Samuel Thibault ccdb68e829 htl: move pthread_once into libc 2025-03-02 15:37:33 +01:00
gfleury 4afbc1aa2e htl: don't export __pthread_default_rwlockattr anymore.
since now all symbloy that use it are in libc
Message-ID: <20250216145434.7089-11-gfleury@disroot.org>
2025-02-16 23:43:04 +01:00
gfleury 6f6732c1c4 htl: move pthread_rwlock_init into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20250216145434.7089-10-gfleury@disroot.org>
2025-02-16 23:43:03 +01:00
gfleury d3ef1b56aa htl: move pthread_rwlock_destroy into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20250216145434.7089-9-gfleury@disroot.org>
2025-02-16 23:42:38 +01:00
gfleury 25650ef6b9 htl: move pthread_rwlock_{rdlock, timedrdlock, timedwrlock, wrlock, clockrdlock, clockwrlock} into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20250216145434.7089-8-gfleury@disroot.org>
2025-02-16 23:08:54 +01:00