cosmopolitan/tool
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
..
args Move LoadZipArgs() to cosmo.h 2024-08-17 12:06:27 -07:00
build Fix apelink reproducible deterministic build bug 2024-09-05 19:37:51 -07:00
cosmocc Remove callback from cosmoaudio API 2024-09-08 19:47:14 -07:00
curl Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
decode Support merging many .a files into one .a file 2024-09-05 19:28:14 -07:00
emacs Make Emacs load 2x faster 2024-08-23 20:08:05 -07:00
hello Make atomics faster on aarch64 2024-08-16 11:14:46 -07:00
lambda Update Musl Libc code 2024-07-30 22:51:29 -07:00
net Delve into clock rabbit hole 2024-09-04 01:32:46 -07:00
plinko Make improvements 2024-09-01 01:27:47 -07:00
scripts Refactor and improve CTL and other code 2024-06-04 05:45:48 -07:00
viz Make recursive mutexes faster 2024-09-10 00:08:59 -07:00
zsh Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
BUILD.mk more modeline errata (#1019) 2023-12-16 23:07:10 -05:00