Bananymous
b774f147da
LibC: Implement dummy pthread_attr_{get,set}detachstate
...
detached threads are not yet supported, but this allows implementation
to make sure threads are joinable.
2025-04-21 19:58:01 +03:00
Bananymous
2a5921b9c9
LibC: Implement pthread_barrier
...
This is not fully working but should be fine for most cases
2025-04-21 19:53:38 +03:00
Bananymous
60cb392e97
LibC: Implement pthread_barrier
...
This is yet another bad sched_yield implementation :D
2025-04-21 19:52:14 +03:00
Bananymous
1c88d0d7f7
LibC: Implement pthread_rwlock
...
This uses the same dumb sched_yield instead of actually blocking :D
2025-04-21 18:48:47 +03:00
Bananymous
5d8dd090a9
LibC: Implement `pthread_once`
2025-04-21 14:17:17 +03:00
Bananymous
265b4c2b22
LibC: Implement `thread_equal`
2025-04-20 03:27:16 +03:00
Bananymous
db9db2cc40
LibC: Implement basic pthread mutexes
...
This implementation is just calling sched_yield if it could not get
mutex. This is not optimal as it does not allow the CPU to idle, but it
works for now :)
Also I did not test this code at all, but it feels correct :D
2025-04-20 03:27:16 +03:00
Bananymous
3642eabac0
LibC: Use BAN::atomic_* functions in pthread spinlock
...
This allows us not to reinterpret_cast pthread_spin_t to
BAN::Atomic<pthread_spin_t> which is much better :)
2025-04-20 03:11:41 +03:00
Bananymous
1ccff9478f
LibC: Don't define __tls_get_addr if TLS is disabled
...
This makes linking fail if something tries to use TLS :)
2025-04-20 03:11:41 +03:00
Bananymous
85f9b585f5
LibC: Don't yield on `pthread_spin_lock`
...
Thats kinda the whole point of spinlocks :D
2025-04-20 03:11:41 +03:00
Bananymous
01626b4c9f
LibC: Add stub for `pthread_detach`
2025-04-20 03:11:41 +03:00
Bananymous
a85841ca76
LibC: Add stub for `pthread_attr_setstacksize`
2025-04-20 03:11:41 +03:00
Bananymous
fe6c4cd0b5
LibC: Implement POSIX TLD area (pthread_key*)
2025-04-20 03:11:41 +03:00
Bananymous
ac90800c3c
Kernel/LibC/DynamicLoader: Implement thread local storage
...
For some reason this does not work on 32 bit version, so it is disabled
on that platform. I'll have to look into it later to find the bug :)
2025-04-15 23:33:39 +03:00
Bananymous
08f5833ca8
Kernel/LibC: Implement pthread_attr_init
2025-04-15 23:31:17 +03:00
Bananymous
36baf7b0af
Kernel/LibC/DynamicLoader: Update process start ABI
...
We now use SysV abi for process startup
2025-04-15 23:05:52 +03:00
Bananymous
5539d5eed0
LibC: Implement pthread_cleanup_{pop,push}
2025-04-15 21:48:38 +03:00
Bananymous
be786be67d
Kernel/LibC: Implement pthread_join
2025-04-02 12:58:39 +03:00
Bananymous
e85b18e206
LibC: Fix pthread stack alignment
2025-04-02 12:58:39 +03:00
Bananymous
f32f62dfc1
LibC: Implement pthread_spin_* functions
2025-04-02 12:58:39 +03:00
Bananymous
5549696c3a
Kernel/LibC: Implement pthread_self
2025-04-02 02:39:29 +03:00
Bananymous
c1618e2b5d
Kernel/LibC: Add basic support for pthread_{create,exit}
2025-04-01 23:26:13 +03:00