mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +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
|
@ -1,8 +1,7 @@
|
|||
#include "libc/x/x.h"
|
||||
/* clang-format off */
|
||||
|
||||
static bool __cp949ext_decmap_once;
|
||||
static void *__cp949ext_decmap_ptr;
|
||||
static _Atomic(void *) __cp949ext_decmap_ptr;
|
||||
static const unsigned char __cp949ext_decmap_rodata[1970] = {
|
||||
0xb5, 0x5a, 0x09, 0x53, 0x14, 0x47, 0x14, 0xce, 0x9b, 0xea, 0x74, 0x4d, 0x6d,
|
||||
0x51, 0xa9, 0x94, 0xbf, 0x58, 0x0c, 0x06, 0x14, 0x03, 0x09, 0x15, 0x14, 0x2c,
|
||||
|
@ -159,9 +158,7 @@ static const unsigned char __cp949ext_decmap_rodata[1970] = {
|
|||
};
|
||||
|
||||
optimizesize void *__cp949ext_decmap(void) {
|
||||
if (__cp949ext_decmap_once) return __cp949ext_decmap_ptr;
|
||||
return xloadzd(&__cp949ext_decmap_once,
|
||||
&__cp949ext_decmap_ptr,
|
||||
return xloadzd(&__cp949ext_decmap_ptr,
|
||||
__cp949ext_decmap_rodata,
|
||||
1970, 10204, 9650, 2, 0xb92a1dffu); /* 10.2073% profit */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue