procs_windows_amd64.odin 596 B

1234567891011121314151617181920212223242526
  1. #+private
  2. #+no-instrumentation
  3. package runtime
  4. foreign import kernel32 "system:Kernel32.lib"
  5. @(private)
  6. foreign kernel32 {
  7. RaiseException :: proc "system" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: u32, lpArguments: ^uint) -> ! ---
  8. }
  9. windows_trap_array_bounds :: proc "contextless" () -> ! {
  10. EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C
  11. RaiseException(EXCEPTION_ARRAY_BOUNDS_EXCEEDED, 0, 0, nil)
  12. }
  13. windows_trap_type_assertion :: proc "contextless" () -> ! {
  14. windows_trap_array_bounds()
  15. }
  16. when ODIN_NO_CRT {
  17. @(require)
  18. foreign import crt_lib "procs_windows_amd64.asm"
  19. }