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
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
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
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
Adhemerval Zanella
c8e73a1492
stdlib: Fix qsort memory leak if callback throws (BZ 32058)
...
If the input buffer exceeds the stack auxiliary buffer, qsort will
malloc a temporary one to call mergesort. Since C++ standard does
allow the callback comparison function to throw [1], the glibc
implementation can potentially leak memory.
The fixes uses a pthread_cleanup_combined_push and
pthread_cleanup_combined_pop, so it can work with and without
exception enables. The qsort code path that calls malloc now
requires some extra setup and a call to __pthread_cleanup_push
anmd __pthread_cleanup_pop (which should be ok since they just
setup some buffer state).
Checked on x86_64-linux-gnu.
[1] https://timsong-cpp.github.io/cppwp/n4950/alg.c.library#4
Reviewed-by: DJ Delorie <dj@redhat.com >
2025-04-02 18:01:55 +00: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
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
gfleury
4b25413df5
htl: move pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-5-gfleury@disroot.org >
2025-02-16 22:59:25 +01:00
gfleury
cd2d31ed58
htl: move pthread_rwlockattr_destroy into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-4-gfleury@disroot.org >
2025-02-16 22:59:16 +01:00
gfleury
e618b671cd
htl: move pthread_rwlockattr_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20250216145434.7089-3-gfleury@disroot.org >
2025-02-16 22:59:07 +01:00
gfleury
710bbc9659
htl: move pthread_barrier_wait into libc.
...
Message-ID: <20250209200108.865599-8-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
2789003489
htl: move pthread_barrier_init into libc.
...
Message-ID: <20250209200108.865599-7-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
735c9b73d6
htl: move pthread_barrier_destroy into libc.
...
Message-ID: <20250209200108.865599-6-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
ccf19a68ab
htl: move pthread_barrierattr_getpshared, pthread_barrierattr_setpshared into libc.
...
Message-ID: <20250209200108.865599-5-gfleury@disroot.org >
2025-02-10 01:39:17 +01:00
gfleury
ca2a95ee67
htl: move pthread_barrierattr_init into libc.
...
Message-ID: <20250209200108.865599-4-gfleury@disroot.org >
2025-02-10 01:18:56 +01:00
gfleury
40cbd3c361
htl: move pthread_barrierattr_destroy into libc.
...
Message-ID: <20250209200108.865599-3-gfleury@disroot.org >
2025-02-10 01:18:17 +01:00
gfleury
cf51d18b9d
htl: move pthread_setcancelstate into libc.
...
sysdeps/pthread/sem_open.c: call pthread_setcancelstate directely
since forward declaration is gone on hurd too
Message-ID: <20250201080202.494671-1-gfleury@disroot.org >
2025-02-01 11:24:14 +01:00
gfleury
9a31eb64db
htl: move pthread_setcanceltype into libc.
...
Message-ID: <20250103103750.870897-7-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
265c5991af
htl: move pthread_mutex_consistent, pthread_mutex_consistent_np into libc.
...
Message-ID: <20250103103750.870897-6-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
8bfabe7a92
htl: move pthread_mutex_destroy into libc.
...
Message-ID: <20250103103750.870897-5-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
be9f0e7681
htl: move pthread_mutex_getprioceiling, pthread_mutex_setprioceiling into libc
...
Message-ID: <20250103103750.870897-4-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
2ebc2d8e24
htl: move pthread_mutex_{lock, unlock, trylock, timedlock, clocklock}
...
I haven't exposed _pthread_mutex_lock, _pthread_mutex_trylock and
_pthread_mutex_unlock in GLIBC_PRIVATE since there aren't used in any
code in libpthread
Message-ID: <20250103103750.870897-3-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
e892a93073
htl: move pthread_mutex_init into libc.
...
Message-ID: <20250103103750.870897-2-gfleury@disroot.org >
2025-01-29 02:32:36 +01:00
gfleury
56b25bfd60
htl: remove leftover for pthread_mutexattr_settype
...
from b386295727
2025-01-29 02:32:36 +01:00
gfleury
396048fa5a
htl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling into libc.
...
Message-ID: <20241231134909.1166440-9-gfleury@disroot.org >
2025-01-02 01:20:21 +01:00
gfleury
4371b11c86
htl: move pthread_mutexattr_{setrobust, setrobust_np}, pthread_mutexattr_{getrobust, getrobust_np} into libc.
...
Message-ID: <20241231134909.1166440-8-gfleury@disroot.org >
2025-01-02 01:20:20 +01:00
gfleury
1e5b39a5e0
htl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.
...
Message-ID: <20241231134909.1166440-7-gfleury@disroot.org >
2025-01-02 01:19:29 +01:00
gfleury
b386295727
htl: move pthread_mutexattr_settype, pthread_mutexattr_gettype into libc.
...
Message-ID: <20241231134909.1166440-6-gfleury@disroot.org >
2025-01-02 00:51:35 +01:00
Samuel Thibault
3cd1cf5fe0
htl: move pthread_mutexattr_setprotocol into libc.
...
Message-ID: <20241231134909.1166440-5-gfleury@disroot.org >
2025-01-02 00:51:17 +01:00
gfleury
15686aa188
htl: move pthread_mutexattr_getprotocol into libc.
...
Message-ID: <20241231134909.1166440-4-gfleury@disroot.org >
2025-01-02 00:51:05 +01:00
gfleury
826b1bbcca
htl: move pthread_mutexattr_init into libc.
...
Message-ID: <20241231134909.1166440-2-gfleury@disroot.org >
2025-01-01 23:44:32 +01:00
Paul Eggert
2642002380
Update copyright dates with scripts/update-copyrights
2025-01-01 11:22:09 -08:00
gfleury
f646be6ff6
htl: move pthread_cond_timedwait, pthread_cond_clockwait, pthread_cond_wait into libc.
...
Message-ID: <20241219203727.669825-9-gfleury@disroot.org >
2024-12-22 23:37:30 +01:00
gfleury
f57a277c16
htl: move pthread_cond_signal into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-6-gfleury@disroot.org >
2024-12-22 23:34:28 +01:00
gfleury
3089d23517
htl: move pthread_cond_broadcast into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-5-gfleury@disroot.org >
2024-12-22 23:34:27 +01:00
gfleury
917a131ab9
htl: move pthread_cond_destroy into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-4-gfleury@disroot.org >
2024-12-22 23:34:27 +01:00
gfleury
8735ea79ab
htl: move pthread_cond_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241219203727.669825-2-gfleury@disroot.org >
2024-12-22 23:34:27 +01:00
gfleury
2716bd6b12
htl: move pthread_sigmask into libc.
...
Message-ID: <20241212220612.782313-3-gfleury@disroot.org >
2024-12-14 23:13:14 +01:00
gfleury
ebd85cdc4a
htl: move pthread_condattr_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
Message-ID: <20241126205329.2215295-6-gfleury@disroot.org >
2024-12-09 02:03:18 +01:00
gfleury
7f045c0b48
htl: move pthread_attr_init into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
2024-11-19 01:37:35 +01:00
gfleury
4a8b7d7e62
htl: move pthread_attr_setstackaddr into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
2024-11-19 01:37:35 +01:00
gfleury
d69a010e7b
htl: move pthread_attr_setstacksize into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
2024-11-19 01:37:35 +01:00
gfleury
330c1fad5b
htl: move pthread_attr_getstack into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
2024-11-19 01:37:35 +01:00
gfleury
1428ae39e8
htl: move pthread_attr_getstackaddr into libc.
...
Signed-off-by: gfleury <gfleury@disroot.org >
2024-11-19 01:37:35 +01:00