mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Use windows specific exception traps
This commit is contained in:
@@ -2,6 +2,23 @@ package runtime
|
||||
|
||||
foreign import kernel32 "system:Kernel32.lib"
|
||||
|
||||
windows_trap_array_bounds :: proc "contextless" () -> ! {
|
||||
DWORD :: u32;
|
||||
ULONG_PTR :: uint;
|
||||
|
||||
EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C;
|
||||
|
||||
foreign kernel32 {
|
||||
RaiseException :: proc(dwExceptionCode, dwExceptionFlags, nNumberOfArguments: DWORD, lpArguments: ^ULONG_PTR) -> ! ---
|
||||
}
|
||||
|
||||
RaiseException(EXCEPTION_ARRAY_BOUNDS_EXCEEDED, 0, 0, nil);
|
||||
}
|
||||
|
||||
windows_trap_type_assertion :: proc "contextless" () -> ! {
|
||||
windows_trap_array_bounds();
|
||||
}
|
||||
|
||||
// @private
|
||||
// @(link_name="_tls_index")
|
||||
// _tls_index: u32;
|
||||
|
||||
Reference in New Issue
Block a user