cosmopolitan/libc/calls/struct
Justine Tunney af7bd80430
Eliminate cyclic locks in runtime
This change introduces a new deadlock detector for Cosmo's POSIX threads
implementation. Error check mutexes will now track a DAG of nested locks
and report EDEADLK when a deadlock is theoretically possible. These will
occur rarely, but it's important for production hardening your code. You
don't even need to change your mutexes to use the POSIX error check mode
because `cosmocc -mdbg` will enable error checking on mutexes by default
globally. When cycles are found, an error message showing your demangled
symbols describing the strongly connected component are printed and then
the SIGTRAP is raised, which means you'll also get a backtrace if you're
using ShowCrashReports() too. This new error checker is so low-level and
so pure that it's able to verify the relationships of every libc runtime
lock, including those locks upon which the mutex implementation depends.
2024-12-16 22:25:12 -08:00
..
aarch64.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bpf.internal.h Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
cpuset.h Add OpenMP support 2024-01-28 22:39:02 -08:00
dirent.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
filter.internal.h Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
flock.h Reduce header complexity 2023-11-28 14:39:42 -08:00
flock.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
framebuffercolormap.h Reduce header complexity 2023-11-28 14:39:42 -08:00
framebufferfixedscreeninfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
framebuffervirtualscreeninfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fsid.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iovec.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
iovec.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
itimerval.h Reduce header complexity 2023-11-28 14:39:42 -08:00
itimerval.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
metasigaltstack.h Reduce header complexity 2023-11-28 14:39:42 -08:00
metastat.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
metatermios.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
rlimit.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
rlimit.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
rusage.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
rusage.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sched_param.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
sched_param.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
seccomp.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sigaction.h Favor siginfo_t over struct siginfo 2024-05-28 02:34:17 -07:00
sigaction.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
sigaltstack.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
sigaltstack.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
siginfo-freebsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
siginfo-meta.internal.h Favor siginfo_t over struct siginfo 2024-05-28 02:34:17 -07:00
siginfo-netbsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
siginfo-openbsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
siginfo-xnu.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
siginfo.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
siginfo.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
sigset.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sigset.internal.h Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
sigval.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sigval.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
stat.h Reduce header complexity 2023-11-28 14:39:42 -08:00
stat.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
stat.macros.h Make some foss compatibility improvements 2022-10-14 13:59:34 -07:00
statfs-freebsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
statfs-linux.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
statfs-meta.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
statfs-netbsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
statfs-openbsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
statfs-xnu.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
statfs.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
statfs.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
statvfs.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sysinfo.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
sysinfo.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
termios.h Reduce header complexity 2023-11-28 14:39:42 -08:00
termios.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
timespec.h Delve into clock rabbit hole 2024-09-04 01:32:46 -07:00
timespec.internal.h Rewrite Windows connect() 2024-09-12 23:07:52 -07:00
timeval.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
timeval.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00
tms.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
ucontext-freebsd.internal.h Introduce FreeBSD ARM64 support 2023-12-29 20:14:02 -08:00
ucontext-netbsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ucontext-openbsd.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ucontext.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
utsname-linux.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
utsname.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
winsize.h Reduce header complexity 2023-11-28 14:39:42 -08:00
winsize.internal.h Avoid linker conflicts on DescribeFoo symbols 2024-08-24 18:10:22 -07:00