mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Implement signal handler tail recursion
GNU Make on Windows now appears to be working reliably. This change also fixes a bug where, after fork the Windows thread handle wasn't reset and that caused undefined behavior using SetThreadContext() with our signals
This commit is contained in:
parent
a657f3e878
commit
cdf556e7d2
15 changed files with 627 additions and 77 deletions
18
libc/nt/psapi/EnumProcessModules.S
Normal file
18
libc/nt/psapi/EnumProcessModules.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp psapi,__imp_EnumProcessModules,EnumProcessModules
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
EnumProcessModules:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_EnumProcessModules(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn EnumProcessModules,globl
|
||||
.previous
|
Loading…
Add table
Add a link
Reference in a new issue