REDIVIVUS

Proposals / #1597

Mac ExitThread: void __cdecl (uint32_t nExitCode) Win32 shim

checked · by KierTaylor · submitted 2026-11-08

This is the Mac Win32-shim ExitThread. There is one cdecl stack arg, [EBP+8] -> ESI = the exit code. It signals the current thread's handles (THREAD_SignalExit 0x0002bf9a with ECX = pthread_self(), EDX = code), then calls pthread_exit(code) 0x0030b32a, which does not return. This matches Win32 void ExitThread(DWORD). Callers: SocketThreadMain.

Changes 1, applied together

  1. Set prototype mac 0x0002bf89

    signatureundefined ExitThread(void)→void ExitThread(uint32_t nExitCode)
    conventionunknown→__cdecl