diff options
Diffstat (limited to 'ripple/minitrace/src')
-rw-r--r-- | ripple/minitrace/src/main.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 6db4747..aa761de 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -235,8 +235,8 @@ define_syscalls! { fn read(fd: FileDesc, buf: *mut u8, count: usize) -> i64 = 0; fn write(fd: FileDesc, buf: *const u8, count: usize) -> i64 = 1; fn close(fd: FileDesc) -> i64 = 3; - fn mmap(addr: u64, len: u64, prot: u64, flags: MapFlags, fd: FileDesc, off: u64) -> i64 = 9; - fn mprotect(addr: u64, len: usize, prot: u64) -> i64 = 10; + fn mmap(addr: u64, len: u64, prot: ProtFlags, flags: MapFlags, fd: 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: i32, act: *const SigAction, oact: *mut SigAction, sigsetsize: usize) -> i64 = 13; fn ioctl(fd: FileDesc, cmd: u32, arg: u64) -> i64 = 16; @@ -479,4 +479,10 @@ syscall_bitflags! { const ANONYMOUS = 1 << 5; const DENYWRITE = 1 << 11; } + + struct ProtFlags: i32 { + const READ = 1 << 0; + const WRITE = 1 << 1; + const EXEC = 1 << 2; + } } |