mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Make garbage collection thread safe
- You can now use _gc(malloc()) in multithreaded programs - This change fixes a bug where fork() on NT disabled TLS - Fixed TLS code morphing on XNU/NT, for R8-R15 registers
This commit is contained in:
parent
571c2c3c69
commit
0e2b1bfeed
37 changed files with 310 additions and 189 deletions
|
@ -28,7 +28,7 @@ struct FtraceTls { /* 16 */
|
|||
struct cthread_descriptor_t {
|
||||
struct cthread_descriptor_t *self; /* 0x00 */
|
||||
struct FtraceTls ftrace; /* 0x08 */
|
||||
void *garbages; /* 0x10 */
|
||||
void *garbages; /* 0x18 */
|
||||
locale_t locale; /* 0x20 */
|
||||
pthread_t pthread; /* 0x28 */
|
||||
struct cthread_descriptor_t *self2; /* 0x30 */
|
||||
|
@ -64,6 +64,7 @@ int cthread_sem_wait(cthread_sem_t *, int, const struct timespec *);
|
|||
int cthread_sem_signal(cthread_sem_t *);
|
||||
int cthread_memory_wait32(int *, int, const struct timespec *);
|
||||
int cthread_memory_wake32(int *, int);
|
||||
void cthread_ungarbage(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue