cosmopolitan/test/libc
Justine Tunney 2f48a02b44
Make recursive mutexes faster
Recursive mutexes now go as fast as normal mutexes. The tradeoff is they
are no longer safe to use in signal handlers. However you can still have
signal safe mutexes if you set your mutex to both recursive and pshared.
You can also make functions that use recursive mutexes signal safe using
sigprocmask to ensure recursion doesn't happen due to any signal handler

The impact of this change is that, on Windows, many functions which edit
the file descriptor table rely on recursive mutexes, e.g. open(). If you
develop your app so it uses pread() and pwrite() then your app should go
very fast when performing a heavily multithreaded and contended workload

For example, when scaling to 40+ cores, *NSYNC mutexes can go as much as
1000x faster (in CPU time) than the naive recursive lock implementation.
Now recursive will use *NSYNC under the hood when it's possible to do so
2024-09-10 00:08:59 -07:00
..
calls Delve into clock rabbit hole 2024-09-04 01:32:46 -07:00
fmt Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
intrin Make recursive mutexes faster 2024-09-10 00:08:59 -07:00
log Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
mem Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
nexgen32e Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
proc Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
runtime Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
sock Fix bugs in poll(), select(), ppoll(), and pselect() 2024-09-02 00:29:52 -07:00
stdio Fix printf-family long double prec/rounding issues (#1283) 2024-09-07 18:26:04 -07:00
str Make improvements 2024-09-01 01:27:47 -07:00
thread Make recursive mutexes faster 2024-09-10 00:08:59 -07:00
time Update Musl Libc code 2024-07-30 22:51:29 -07:00
tinymath Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
x Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
xed Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
BUILD.mk Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00