Added Linux/signal exception handling.

This commit is contained in:
Branimir Karadžić
2025-08-23 09:20:41 -07:00
parent d858859d17
commit d2b8b1aab5
8 changed files with 146 additions and 28 deletions

View File

@@ -361,9 +361,18 @@ namespace bx
#endif // BX_PLATFORM_LINUX
}
void exit(int32_t _exitCode)
void exit(int32_t _exitCode, bool _cleanup)
{
::exit(_exitCode);
if (_cleanup)
{
::exit(_exitCode);
}
#if BX_PLATFORM_WINDOWS
TerminateProcess(GetCurrentProcess(), _exitCode);
#else
_Exit(_exitCode);
#endif // BX_PLATFORM_*
}
void* memoryMap(void* _address, size_t _size, Error* _err)