Add pthread tls api

This commit is contained in:
Justine Tunney 2022-06-22 06:37:45 -07:00
parent 0e773e23ad
commit 9545062175
15 changed files with 333 additions and 7 deletions

View file

@ -1,6 +1,7 @@
#ifndef COSMOPOLITAN_LIBC_THREAD_THREAD_H_
#define COSMOPOLITAN_LIBC_THREAD_THREAD_H_
#include "libc/calls/struct/timespec.h"
#include "libc/intrin/pthread.h"
#include "libc/runtime/runtime.h"
#define CTHREAD_CREATE_DETACHED 1
@ -33,6 +34,7 @@ struct cthread_descriptor_t {
char *top, *bottom;
} stack, alloc;
jmp_buf exiter;
void *key[PTHREAD_KEYS_MAX];
};
typedef struct cthread_descriptor_t *cthread_t;