mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Make more threading improvements
- ASAN memory morgue is now lockless - Make C11 atomics header more portable - Rewrote pthread keys support to be lockless - Simplify Python's unicode table unpacking code - Make crash report write(2) closer to being atomic - Make it possible to strace/ftrace a single thread - ASAN now checks nul-terminated strings fast and properly - Windows fork() now restores TLS memory of calling thread
This commit is contained in:
parent
d7b88734cd
commit
e522aa3a07
189 changed files with 1363 additions and 1217 deletions
|
@ -81,10 +81,7 @@ struct PosixThread {
|
|||
typedef void (*atfork_f)(void);
|
||||
|
||||
extern struct PosixThread _pthread_main;
|
||||
hidden extern pthread_spinlock_t _pthread_keys_lock;
|
||||
hidden extern uint64_t _pthread_key_usage[(PTHREAD_KEYS_MAX + 63) / 64];
|
||||
hidden extern pthread_key_dtor _pthread_key_dtor[PTHREAD_KEYS_MAX];
|
||||
hidden extern _Thread_local void *_pthread_keys[PTHREAD_KEYS_MAX];
|
||||
extern _Atomic(pthread_key_dtor) _pthread_key_dtor[PTHREAD_KEYS_MAX] hidden;
|
||||
|
||||
int _pthread_atfork(atfork_f, atfork_f, atfork_f) hidden;
|
||||
int _pthread_reschedule(struct PosixThread *) hidden;
|
||||
|
@ -97,9 +94,7 @@ void _pthread_zombies_add(struct PosixThread *) hidden;
|
|||
void _pthread_zombies_purge(void) hidden;
|
||||
void _pthread_zombies_decimate(void) hidden;
|
||||
void _pthread_zombies_harvest(void) hidden;
|
||||
void _pthread_key_destruct(void *[PTHREAD_KEYS_MAX]) hidden;
|
||||
void _pthread_key_lock(void) hidden;
|
||||
void _pthread_key_unlock(void) hidden;
|
||||
void _pthread_key_destruct(void) hidden;
|
||||
void _pthread_onfork_prepare(void) hidden;
|
||||
void _pthread_onfork_parent(void) hidden;
|
||||
void _pthread_onfork_child(void) hidden;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue