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 6a84679..c274d0b 100644 --- a/ripple/minitrace/src/syscall_abi/mod.rs +++ b/ripple/minitrace/src/syscall_abi/mod.rs @@ -42,7 +42,7 @@ define_syscalls! { fn exit_group(error_code: i32) -> i64 = 231; fn openat(dfd: DirFd, filename: CString, flags: OpenFlags, mode: FileMode) -> i64 = 257; fn newfstatat(dfd: DirFd, filename: CString, statbuf: *mut Stat, flags: AtFlags) -> i64 = 262; - fn set_robust_list(head: *mut RobustListHead, len: usize) -> i64 = 273; + fn set_robust_list(head: *mut RobustListHead, len: RobustListHeadSize) -> i64 = 273; fn prlimit64(pid: i32, resource: ResourceLimit, new_rlim: *const RLimit64, old_rlim: *mut RLimit64) -> i64 = 302; fn getrandom(ubuf: *mut u8, len: usize, flags: GrndFlags) -> i64 = 318; } @@ -138,3 +138,16 @@ impl SyscallArg for SigSetSize { } } } + +#[derive(Debug, Copy, Clone)] +pub(crate) struct RobustListHeadSize; + +impl SyscallArg for RobustListHeadSize { + fn try_from_reg(reg: u64) -> Option<Self> { + if reg == 24 { + Some(RobustListHeadSize) + } else { + None + } + } +} |