Commit Graph

12 Commits

Author SHA1 Message Date
K. Lange
bbd609086a libc: make pthread_t scalar
While POSIX.1-2001 says that pthread_t is allowed to be
"non-arithmetic", earlier revisions did not allow it, and
many things still assume the original rule and either
complain loudly or fail completely if pthread_t is a struct.

In glibc, pthread_t is typedef'd to 'unsigned long int', but
in musl, it is a pointer type to an opaque struct. We'll go
with the latter option here.

Note that while this breaks ABI combatibility for the libc,
nothing in the x86-64 or aarch64 package repositories uses
pthreads, so this probably doesn't matter too much. If you
are one of the handful of souls brave enough to be maintaining
your own downstream software for ToaruOS and you use pthreads,
it's time to rebuild.

This is an initial change that will be followed up with more
thorough internal changes to our pthreads implementation.
2022-08-27 15:53:37 +09:00
K. Lange
9e44d08ed7 ld.so: Possibly incorrect dynamic TLS implementation 2022-05-26 08:58:49 +09:00
K. Lange
58a1b6e999 pthread: Remove magic thread exit; pthread_exit() is just syscall_exit 2022-03-12 18:46:28 +09:00
K. Lange
2c1f2b942d x86_64: Put TLS data after the self-pointer, like we started doing in aarch64 2022-02-01 07:55:11 +09:00
K. Lange
b53a56fe72 aarch64: begin work on new target 2022-01-30 21:25:27 +09:00
K. Lange
98bcb40671 nproc: Expose processor count and use it to pick between yielding and non-yielding spin locks 2021-09-02 17:27:21 +09:00
K. Lange
b35f7ac8c9 misaka: initial merge 2021-05-31 10:54:11 +09:00
K. Lange
230870ad7b kernel, linker, libc: Initial, probably horribly broken, support for some TLS situations 2021-02-16 18:49:34 +09:00
K. Lange
bdd407f29c libc: more pthread stubs 2018-12-19 14:38:08 +09:00
K. Lange
c9c18f70ad libc: move syscall defs; consistently use SYS_ macros 2018-12-10 10:09:27 +09:00
K. Lange
b1fe4fa4ce More errno stuff 2018-07-18 10:45:42 +09:00
K. Lange
b6d6d8900e include pthread in libc 2018-05-09 21:26:45 +09:00