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 jisx0213_pair_encmap_once;
|
||||
static void *jisx0213_pair_encmap_ptr;
|
||||
static _Atomic(void *) jisx0213_pair_encmap_ptr;
|
||||
static const unsigned char jisx0213_pair_encmap_rodata[] = {
|
||||
0x1d, 0xc8, 0x31, 0x4e, 0xc2, 0x70, 0x18, 0x86, 0xf1, 0xcf, 0x8f, 0xab, 0x80,
|
||||
0x09, 0x69, 0x08, 0x6f, 0xc3, 0xa0, 0x09, 0xa3, 0x0c, 0x68, 0xad, 0x0d, 0x81,
|
||||
|
@ -23,9 +22,7 @@ static const unsigned char jisx0213_pair_encmap_rodata[] = {
|
|||
};
|
||||
|
||||
optimizesize void *jisx0213_pair_encmap(void) {
|
||||
if (jisx0213_pair_encmap_once) return jisx0213_pair_encmap_ptr;
|
||||
return xload(&jisx0213_pair_encmap_once,
|
||||
&jisx0213_pair_encmap_ptr,
|
||||
return xload(&jisx0213_pair_encmap_ptr,
|
||||
jisx0213_pair_encmap_rodata,
|
||||
207, 368); /* 56.25% profit */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue