diff options
-rw-r--r-- | ripple/minitrace/src/main.rs | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 523cc09..46773ee 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -127,34 +127,30 @@ macro_rules! define_syscalls { macro_rules! syscall_bitflags { ( - struct $BitFlags:ident: $T:ty { - $( - const $FLAG:ident = $value:expr; - )* - } - - $($t:tt)* - ) => { - bitflags! { - struct $BitFlags: $T { + $( + struct $BitFlags:ident: $T:ty { $( - const $FLAG = $value; + const $FLAG:ident = $value:expr; )* } - } - - impl SyscallArg for $BitFlags { - fn try_from_reg(reg: u64) -> Option<Self> { - SyscallArg::try_from_reg(reg).and_then(Self::from_bits) + )* + ) => { + $( + bitflags! { + struct $BitFlags: $T { + $( + const $FLAG = $value; + )* + } } - } - syscall_bitflags! { - $($t)* - } + impl SyscallArg for $BitFlags { + fn try_from_reg(reg: u64) -> Option<Self> { + SyscallArg::try_from_reg(reg).and_then(Self::from_bits) + } + } + )* }; - - () => {} } trait SyscallArg: Sized { |