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 :)
This commit is contained in:
2025-04-15 23:33:39 +03:00
parent 08f5833ca8
commit ac90800c3c
10 changed files with 447 additions and 15 deletions

View File

@@ -8,6 +8,7 @@
__BEGIN_DECLS
#include <sched.h>
#include <stdint.h>
#include <time.h>
#define __need_size_t
@@ -27,6 +28,14 @@ __BEGIN_DECLS
#define __need_pthread_t
#include <sys/types.h>
struct uthread
{
struct uthread* self;
void* master_tls_addr;
size_t master_tls_size;
uintptr_t dtv[];
};
#define PTHREAD_BARRIER_SERIAL_THREAD 1
#define PTHREAD_CANCEL_ASYNCHRONOUS 2
#define PTHREAD_CANCEL_ENABLE 3