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:
Justine Tunney 2023-10-14 10:29:26 -07:00
parent a657f3e878
commit cdf556e7d2
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
15 changed files with 627 additions and 77 deletions

View file

@ -78,6 +78,17 @@ int64_t CreateToolhelp32Snapshot(uint32_t dwFlags, uint32_t th32ProcessID);
bool32 Process32First(int64_t hSnapshot, struct NtProcessEntry32 *in_out_lppe);
bool32 Process32Next(int64_t hSnapshot, struct NtProcessEntry32 *out_lppe);
bool32 EnumProcesses(uint32_t *out_lpidProcess, uint32_t cb,
uint32_t *out_lpcbNeeded) paramsnonnull();
bool32 EnumProcessModules(int64_t hProcess, int64_t *out_lphModule, uint32_t cb,
uint32_t *out_lpcbNeeded) paramsnonnull();
bool32 EnumProcessModulesEx(int64_t hProcess, int64_t *out_lphModule,
uint32_t cb, uint32_t *out_lpcbNeeded,
uint32_t dwFilterFlag) paramsnonnull();
uint32_t GetModuleBaseName(int64_t hProcess, int64_t opt_hModule,
char16_t *out_lpBaseName, uint32_t nSize)
paramsnonnull();
#if ShouldUseMsabiAttribute()
#include "libc/nt/thunk/process.inc"
#endif /* ShouldUseMsabiAttribute() */