diff options
Diffstat (limited to 'ripple/minitrace/src/syscall_abi')
-rw-r--r-- | ripple/minitrace/src/syscall_abi/mod.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ripple/minitrace/src/syscall_abi/mod.rs b/ripple/minitrace/src/syscall_abi/mod.rs index e0b35a9..6a84679 100644 --- a/ripple/minitrace/src/syscall_abi/mod.rs +++ b/ripple/minitrace/src/syscall_abi/mod.rs @@ -29,7 +29,7 @@ define_syscalls! { fn mmap(addr: u64, len: u64, prot: ProtFlags, flags: MapFlags, fd: Option<FileDesc>, off: u64) -> i64 = 9; fn mprotect(addr: u64, len: usize, prot: ProtFlags) -> i64 = 10; fn brk(brk: u64) -> i64 = 12; - fn rt_sigaction(sig: Signal, act: *const SigAction, oact: *mut SigAction, sigsetsize: usize) -> i64 = 13; + fn rt_sigaction(sig: Signal, act: *const SigAction, oact: *mut SigAction, sigsetsize: SigSetSize) -> i64 = 13; fn ioctl(fd: FileDesc, cmd: Ioctl, arg: u64) -> i64 = 16; fn pread64(fd: FileDesc, buf: *mut u8, count: usize, pos: u64) -> i64 = 17; fn access(filename: CString, mode: AccessMode) -> i64 = 21; @@ -125,3 +125,16 @@ syscall_enums! { SEGV = 11 => SIGSEGV, } } + +#[derive(Debug, Copy, Clone)] +pub(crate) struct SigSetSize; + +impl SyscallArg for SigSetSize { + fn try_from_reg(reg: u64) -> Option<Self> { + if reg == 8 { + Some(SigSetSize) + } else { + None + } + } +} |