cosmopolitan/libc/nt
Justine Tunney 379cd77078
Improve memory manager and signal handling
On Windows, mmap() now chooses addresses transactionally. It reduces the
risk of badness when interacting with the WIN32 memory manager. We don't
throw darts anymore. There is also no more retry limit, since we recover
from mystery maps more gracefully. The subroutine for combining adjacent
maps has been rewritten for clarity. The print maps subroutine is better

This change goes to great lengths to perfect the stack overflow code. On
Windows you can now longjmp() out of a crash signal handler. Guard pages
previously weren't being restored properly by the signal handler. That's
fixed, so on Windows you can now handle a stack overflow multiple times.
Great thought has been put into selecting the perfect SIGSTKSZ constants
so you can save sigaltstack() memory. You can now use kprintf() with 512
bytes of stack available. The guard pages beneath the main stack are now
recorded in the memory manager.

This change fixes getcontext() so it works right with the %rax register.
2024-12-27 01:33:00 -08:00
..
advapi32 Make improvements 2024-02-12 10:23:00 -08:00
API-MS-Win-Core-Memory-l1-1-6 Make some new Windows 10 memory APIs available 2024-07-19 22:26:49 -07:00
API-MS-Win-Core-Realtime-l1-1-1 Delve into clock rabbit hole 2024-09-04 01:32:46 -07:00
API-MS-Win-Core-Synch-l1-2-0 Add OpenMP support 2024-01-28 22:39:02 -08:00
BCryptPrimitives Make improvements 2024-02-12 10:23:00 -08:00
comdlg32 Add OpenMP support 2024-01-28 22:39:02 -08:00
enum Improve memory manager and signal handling 2024-12-27 01:33:00 -08:00
gdi32 Add several NT functions (#1318) 2024-10-27 21:10:32 -07:00
iphlpapi Add OpenMP support 2024-01-28 22:39:02 -08:00
kernel32 Add several NT functions (#1318) 2024-10-27 21:10:32 -07:00
nt Reduce header complexity 2023-11-28 14:39:42 -08:00
ntdll Improve Windows sleep accuracy from 15ms to 15µs 2024-12-06 23:03:57 -08:00
pdh Add OpenMP support 2024-01-28 22:39:02 -08:00
PowrProf Add OpenMP support 2024-01-28 22:39:02 -08:00
psapi Add OpenMP support 2024-01-28 22:39:02 -08:00
shell32 Add several NT functions (#1318) 2024-10-27 21:10:32 -07:00
struct Fix the build 2024-08-26 16:44:05 -07:00
thunk Walk back most uses of __STRICT_ANSI__ 2024-02-27 04:09:49 -08:00
typedef Reduce header complexity 2023-11-28 14:39:42 -08:00
user32 Add several NT functions (#1318) 2024-10-27 21:10:32 -07:00
ws2_32 Add OpenMP support 2024-01-28 22:39:02 -08:00
accounting.h Reduce header complexity 2023-11-28 14:39:42 -08:00
automation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Add several NT functions (#1318) 2024-10-27 21:10:32 -07:00
codegen.h Make improvements 2020-12-01 03:43:40 -08:00
codegen.sh more modeline errata (#1019) 2023-12-16 23:07:10 -05:00
comdlg.h Reduce header complexity 2023-11-28 14:39:42 -08:00
comms.h Reduce header complexity 2023-11-28 14:39:42 -08:00
console.h Add WIN32 pseudo console APIs 2023-12-10 01:29:25 -08:00
createfile.h Reduce header complexity 2023-11-28 14:39:42 -08:00
debug.h Reduce header complexity 2023-11-28 14:39:42 -08:00
dll.h Resurrect <windows.h> as <windowsesque.h> 2024-02-21 16:41:11 -08:00
efi.h Reduce header complexity 2023-11-28 14:39:42 -08:00
errors.h Run clang-format on most sources 2023-04-27 05:44:32 -07:00
events.h Resurrect <windows.h> as <windowsesque.h> 2024-02-21 16:41:11 -08:00
files.h Introduce interprocess signaling on Windows 2024-09-19 03:02:13 -07:00
iocp.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ipc.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iphlpapi.h Reduce header complexity 2023-11-28 14:39:42 -08:00
master.sh Improve Windows sleep accuracy from 15ms to 15µs 2024-12-06 23:03:57 -08:00
memory.h Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
messagebox.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ntdll.h Improve Windows sleep accuracy from 15ms to 15µs 2024-12-06 23:03:57 -08:00
ntdllimport.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
ntdllimport.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
paint.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pdh.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pedef.internal.h Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
privilege.h Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
process.h Reduce header complexity 2023-11-28 14:39:42 -08:00
registry.h Reduce header complexity 2023-11-28 14:39:42 -08:00
runtime.h Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
signals.h Reduce header complexity 2023-11-28 14:39:42 -08:00
startupinfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
synchronization.h Introduce getcpu() system call from glibc 2024-02-21 18:17:20 -08:00
system.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systeminfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sysv2nt.S Fix more vi modelines (#1006) 2023-12-13 02:28:11 -05:00
thread.h Reduce header complexity 2023-11-28 14:39:42 -08:00
time.h Delve into clock rabbit hole 2024-09-04 01:32:46 -07:00
windows.h Reduce header complexity 2023-11-28 14:39:42 -08:00
winsock.h Reduce header complexity 2023-11-28 14:39:42 -08:00