Commit Graph

144 Commits

Author SHA1 Message Date
Samuel Thibault 7bc54f0965 htl: Fix making pthread_join check timeout value 2025-01-07 01:02:20 +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 beabc5dff5 htl: move pthread_mutexattr_destroy into libc.
Message-ID: <20241231134909.1166440-3-gfleury@disroot.org>
2025-01-01 23:46:19 +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 ba8522542f htl: move __pthread_mutex_checklocked into libc.
move out __getpid from pt-mutex.h
and in pt-mutex-* include <unistd.h> where
__getpid was called

Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-8-gfleury@disroot.org>
2024-12-22 23:34:28 +01:00
gfleury a369d567d2 htl: move __pthread_timedblock, __pthread_timedblock_intr, __pthread_block, __pthread_block_intr into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-7-gfleury@disroot.org>
2024-12-22 23:34:28 +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 4ab765c6ba htl: move __pthread_wakeup into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-3-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 79cb83c7f9 htl: move __pthread_sigstate into libc.
Message-ID: <20241212220612.782313-2-gfleury@disroot.org>
2024-12-14 23:12:01 +01:00
gfleury dca0807a4d htl: move __pthread_sigstate_destroy into libc.
Message-ID: <20241212220612.782313-1-gfleury@disroot.org>
2024-12-14 23:11:45 +01:00
gfleury a4b4b9a96b htl: move pthread_condattr_setpshared into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-8-gfleury@disroot.org>
2024-12-09 02:03:18 +01:00
gfleury 5ccb28e65d htl: move pthread_condattr_setclock into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-7-gfleury@disroot.org>
2024-12-09 02:03:18 +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 25699c4c3a htl: move pthread_condattr_getpshared into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-5-gfleury@disroot.org>
2024-12-09 02:03:18 +01:00
gfleury f1b5041354 htl: move pthread_condattr_getclock into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-4-gfleury@disroot.org>
2024-12-09 02:03:17 +01:00
gfleury 7ded100d36 htl: move __pthread_default_condattr into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-3-gfleury@disroot.org>
2024-12-09 01:49:49 +01:00
gfleury c982918e3e htl: move pthread_condattr_destroy into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-2-gfleury@disroot.org>
2024-12-09 01:49:40 +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 1a1cedd635 htl: move pthread_attr_setguardsize into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:37:35 +01:00
gfleury f26b272a75 htl: move pthread_attr_setschedparam into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:37:35 +01:00
gfleury 32aa498ceb htl: move pthread_attr_setscope 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
gfleury 993440a260 htl move pthread_attr_getstacksize into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:34:34 +01:00
gfleury 4bcda927fe htl move pthread_attr_getscope into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:19:00 +01:00
gfleury 6caf24c972 htl move pthread_attr_getguardsize into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:18:59 +01:00
gfleury f55cf584ff htl: move __pthread_default_attr into libc
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:08:27 +01:00
gfleury 736befab6c htl: move pthread_attr_destroy into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
2024-11-19 01:08:14 +01:00
Samuel Thibault 8dc3f4f8ad hurd: Fix missing pthread_ compat symbol in libc
5476f8cd2e ("htl: move pthread_self info libc.") and
9dfa256216 ("htl: move pthread_equal into libc") to
1dc0bc8f07 ("htl: move pthread_attr_setdetachstate into libc")
moved some pthread_ symbols from libpthread.so to libc.so, but missed
adding the compat version like 5476f8cd2e ("htl: move pthread_self
info libc.") did: libc already had these symbols as forwards,
but versioned GLIBC_2.21, while the symbols in libpthread.so were
versioned GLIBC_2.12.

To fix running executables built before this, we thus have to add the
GLIBC_2.12 version, otherwise execution fails with e.g.

/usr/lib/i386-gnu/libglib-2.0.so: symbol lookup error: /usr/lib/i386-gnu/libglib-2.0.so: undefined symbol: pthread_attr_setinheritsched, version GLIBC_2.12
2024-08-01 23:58:51 +02:00
Samuel Thibault 0e75c4a463 hurd: Fix pthread_self() without libpthread
5476f8cd2e ("htl: move pthread_self info libc.") moved the htl
pthread_self() function from libpthread to libc, replacing the previous libc
stub that just returns 0. And 53da64d1cf ("htl: Initialize ___pthread_self
early") added initialization code which is needed before being able to
call pthread_self. It is currently in libpthread, and thus never called
before programs can call pthread_self from libc, which then segfaults
when accessing _pthread_self()->thread.

This moves the initialization to libc itself, as initialized variables, so
pthread_self can always be called fine.
2024-07-17 14:14:21 +02:00
Flavio Cruz 2dcc908538 Add pthread_getname_np and pthread_setname_np for Hurd
We use thread_get_name and thread_set_name to get and set the thread
name, so nothing is stored in the thread structure since these functions
are supposed to be called sparingly.

One notable difference with Linux is that the thread name is up to 32
chars, whereas Linux's is 16.

Also added a mach_RPC_CHECK to check for the existing of gnumach RPCs.
2024-07-16 09:21:52 +02:00
Sergey Bugaev dc1a77269c htl: Implement some support for TLS_DTV_AT_TP
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-ID: <20240323173301.151066-19-bugaevc@gmail.com>
2024-03-23 23:00:30 +01:00
Carlos O'Donell 5420d211f0 htl/tests: Reformat Makefile.
Reflow and sort Makefile.

No code generation changes in non-test binary artifacts.

No regressions on x86_64 and i686.

Tested with build-many-glibcs.py for x86_64-gnu.
2024-02-25 13:38:16 -05:00
Carlos O'Donell d19d28853c htl: Reformat Makefile.
Reflow and sort Makefile.

Code generation changes present due to link order changes.

No regressions on x86_64 and i686.
2024-02-25 13:38:16 -05:00
Paul Eggert dff8da6b3e Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Samuel Thibault 6333a6014f __call_tls_dtors: Use call_function_static_weak 2023-09-04 20:03:37 +02:00
Samuel Thibault 89ade8d8cb htl: thread_local destructors support 2023-09-03 15:23:56 +02:00