kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

signal.c (488B)


      1 #include "emu/emu.h"
      2 
      3 KitStatus emu_fault_deliver(EmuProcess* process, EmuThread* thread,
      4                             const EmuFaultEvent* ev, u64* next_pc_out) {
      5   if (!process || !thread || !ev || !next_pc_out) return KIT_INVALID;
      6   if (!process->os || !process->os->emu_deliver_fault) {
      7     emu_cpu_trap_fault(emu_thread_cpu(thread));
      8     *next_pc_out = ev->pc ? ev->pc : ev->next_pc;
      9     return KIT_OK;
     10   }
     11   return process->os->emu_deliver_fault(process, thread, ev, next_pc_out);
     12 }