REDIVIVUS

Proposals / #1536

Mac GetCurrentThreadId: uint32_t __cdecl (void) Win32 shim

checked · by KierTaylor · submitted 2026-11-08

This is the Mac Win32-shim GetCurrentThreadId. It reads no args; the body is a frame-only tail JMP to the import _pthread_self 0x0030b372 (pthread_t (void)), so the thread identity comes back in EAX. Callers keep it: SCOMP_AcquireTempBuffer 0x0000f1b6 stores EAX to [EBP-0x18] as the buffer owner. This matches Win32 DWORD GetCurrentThreadId(void).

Changes 1, applied together

  1. Set prototype mac 0x0002c02c

    signatureundefined GetCurrentThreadId(void)→uint32_t GetCurrentThreadId(void)
    conventionunknown→__cdecl