about summary refs log tree commit diff
path: root/htl
Commit message (Collapse)AuthorAgeFilesLines
* htl: move pthread_attr_init into libc.gfleury3 days4-6/+3
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_setguardsize into libc.gfleury3 days2-2/+3
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_setschedparam into libc.gfleury3 days4-7/+2
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_setscope into libc.gfleury3 days4-7/+2
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_setstackaddr into libc.gfleury3 days2-3/+9
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_setstacksize into libc.gfleury3 days2-2/+4
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_getstack into libc.gfleury3 days2-3/+4
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_getstackaddr into libc.gfleury3 days2-2/+5
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl move pthread_attr_getstacksize into libc.gfleury3 days2-2/+5
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl move pthread_attr_getscope into libc.gfleury3 days4-5/+3
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl move pthread_attr_getguardsize into libc.gfleury3 days2-2/+7
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move __pthread_default_attr into libcgfleury3 days3-1/+3
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* htl: move pthread_attr_destroy into libc.gfleury3 days4-5/+2
| | | | Signed-off-by: gfleury <gfleury@disroot.org>
* hurd: Fix missing pthread_ compat symbol in libcSamuel Thibault2024-08-011-0/+10
| | | | | | | | | | | | | | | | 5476f8cd2e68 ("htl: move pthread_self info libc.") and 9dfa2562162b ("htl: move pthread_equal into libc") to 1dc0bc8f0748 ("htl: move pthread_attr_setdetachstate into libc") moved some pthread_ symbols from libpthread.so to libc.so, but missed adding the compat version like 5476f8cd2e68 ("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
* hurd: Fix pthread_self() without libpthreadSamuel Thibault2024-07-171-0/+1
| | | | | | | | | | | | | 5476f8cd2e68 ("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 53da64d1cf36 ("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.
* Add pthread_getname_np and pthread_setname_np for HurdFlavio Cruz2024-07-162-0/+7
| | | | | | | | | | | 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.
* htl: Implement some support for TLS_DTV_AT_TPSergey Bugaev2024-03-231-0/+2
| | | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20240323173301.151066-19-bugaevc@gmail.com>
* htl/tests: Reformat Makefile.Carlos O'Donell2024-02-251-4/+19
| | | | | | | | | | 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.
* htl: Reformat Makefile.Carlos O'Donell2024-02-251-141/+183
| | | | | | | | Reflow and sort Makefile. Code generation changes present due to link order changes. No regressions on x86_64 and i686.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-0147-47/+47
|
* __call_tls_dtors: Use call_function_static_weakSamuel Thibault2023-09-041-4/+1
|
* htl: thread_local destructors supportSamuel Thibault2023-09-031-0/+6
|
* htl: move pthread_attr_setdetachstate into libcGuy-Fleury Iteriteka2023-08-244-7/+4
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-11-gfleury@disroot.org>
* htl: move pthread_attr_getdetachstate into libcGuy-Fleury Iteriteka2023-08-244-7/+3
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-10-gfleury@disroot.org>
* htl: move pthread_attr_setschedpolicy into libcGuy-Fleury Iteriteka2023-08-244-7/+3
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-9-gfleury@disroot.org>
* htl: move pthread_attr_getschedpolicy into libcGuy-Fleury Iteriteka2023-08-244-6/+2
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-8-gfleury@disroot.org>
* htl: move pthread_attr_setinheritsched into libcGuy-Fleury Iteriteka2023-08-244-7/+4
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-7-gfleury@disroot.org>
* htl: move pthread_attr_getinheritsched into libcGuy-Fleury Iteriteka2023-08-244-6/+3
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-6-gfleury@disroot.org>
* htl: move pthread_attr_getschedparam into libcGuy-Fleury Iteriteka2023-08-244-7/+3
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-5-gfleury@disroot.org>
* htl: move pthread_setschedparam into libcGuy-Fleury Iteriteka2023-08-244-9/+3
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-4-gfleury@disroot.org>
* htl: move pthread_getschedparam into libcGuy-Fleury Iteriteka2023-08-244-8/+4
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-3-gfleury@disroot.org>
* htl: move pthread_equal into libcGuy-Fleury Iteriteka2023-08-244-8/+2
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230716084414.107245-2-gfleury@disroot.org>
* htl: Initialize ___pthread_self earlySamuel Thibault2023-08-082-17/+1
| | | | | | | | | | When using jemalloc, malloc() needs to use TSD, while libpthread initialization needs malloc(). Having ___pthread_self set early to some static storage allows TSD to work early, thus allowing jemalloc and libpthread to initialize together. This incidentaly simplifies __pthread_enable/disable_asynccancel and __pthread_self, now that ___pthread_self is always initialized.
* Fix all the remaining misspellings -- BZ 25337Paul Pluzhnikov2023-06-023-3/+3
|
* hurd 64bit: Fix pthread_t/thread_t type to longSamuel Thibault2023-05-011-0/+2
| | | | So that they can be trivially cast to pointer type, like with nptl.
* htl: move pthread_self info libc.Guy-Fleury Iteriteka2023-04-055-12/+14
| | | | | Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230318095826.1125734-4-gfleury@disroot.org>
* htl: move ___pthread_self into libc.Guy-Fleury Iteriteka2023-04-052-1/+2
| | | | | | | | | | | sysdeps/mach/hurd/htl/pt-pthread_self.c: New file. htl/Makefile: .. Add it to libc routine. sysdeps/mach/hurd/htl/pt-sysdep.c(__pthread_self): Remove it. sysdeps/mach/hurd/htl/pt-sysdep.h(__pthread_self): Add hidden propertie. htl/Versions(__pthread_self) Version it as private symbol. Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230318095826.1125734-3-gfleury@disroot.org>
* htl: move __pthtread_total into libcGuy-Fleury Iteriteka2023-04-055-7/+26
| | | | | | | | | | | htl/pt-nthreads.c: new file. htl/Makefile: Add it to routine. htl/Versions: version it as private libc symbol. htl/pt-create.c: remove his definition here. htl/pt-internal.h: add propertie to it declaration. Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230318095826.1125734-2-gfleury@disroot.org>
* Fix typos in commentsSamuel Thibault2023-02-121-1/+1
|
* mach, hurd: Cast through uintptr_tSergey Bugaev2023-02-121-2/+3
| | | | | | | | | | | | | | | | When casting between a pointer and an integer of a different size, GCC emits a warning (which is escalated to a build failure by -Werror). Indeed, if what you start with is a pointer, which you then cast to a shorter integer and then back again, you're going to cut off some bits of the pointer. But if you start with an integer (such as mach_port_t), then cast it to a longer pointer (void *), and then back to a shorter integer, you are fine. To keep GCC happy, cast through an intermediary uintptr_t, which is always the same size as a pointer. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230212111044.610942-4-bugaevc@gmail.com>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-0646-46/+46
|
* htl: Check error returned by __getrlimitSamuel Thibault2023-01-021-2/+2
|
* Use C11 atomics instead of atomic_decrement_and_testWilco Dijkstra2022-09-232-2/+2
| | | | | | | | | | Replace atomic_decrement_and_test with atomic_fetch_add_relaxed. These are simple counters which do not protect any shared data from concurrent accesses. Also remove the unused file cond-perf.c. Passes regress on AArch64. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use C11 atomics instead of atomic_increment(_val)Wilco Dijkstra2022-09-231-1/+1
| | | | | | | | | | | Replace atomic_increment and atomic_increment_val with atomic_fetch_add_relaxed. One case in sem_post.c uses release semantics (see comment above it). The others are simple counters and do not protect any shared data from concurrent accesses. Passes regress on AArch64. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use C11 atomics instead of atomic_decrement(_val)Wilco Dijkstra2022-09-091-1/+1
| | | | | | | Replace atomic_decrement and atomic_decrement_val with atomic_fetch_add_relaxed. Reviewed-by: DJ Delorie <dj@redhat.com>
* htl: Let pthread_self and cancellability called earlySamuel Thibault2022-08-022-1/+15
| | | | | | | When applications redirect some functions they might get called before libpthread is fully initialized. They may still expected pthread_self and cancellable functions to work, so cope with such calls in that situation.
* htl: Destroy thread-specific data before releasing joinsSamuel Thibault2022-02-141-3/+3
| | | | | Applications may want to assume that after pthread_join() returns, all thread-specific data has been released.
* htl: Fix cleaning the reply portSamuel Thibault2022-01-226-25/+27
| | | | | | | | | | | | | If any RPC fails, the reply port will already be deallocated. __pthread_thread_terminate thus has to defer taking its name until the very last __thread_terminate_release which doesn't reply a message. But then we have to read from the pthread structure. This introduces __pthread_dealloc_finish() which does the recording of the thread termination, so the slot can be reused really only just before the __thread_terminate_release call. Only the real thread can set it, so let's decouple this from the pthread_state by just removing the PTHREAD_TERMINATED state and add a terminated field.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-0146-46/+46
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* htl: Fix sigset of main threadSamuel Thibault2021-09-261-2/+5
| | | | | | | d482ebfa6785 ('htl: Keep thread signals blocked during its initialization') fixed not letting signals get delivered too early during thread creation, but it also affected the main thread, thus making it block signals by default. We need to just let the main thread sigset as it is.