From 944c1fc7ed2ac0dc396bafea5ae92aca04dd139a Mon Sep 17 00:00:00 2001 From: edef Date: Fri, 29 Jul 2022 12:35:02 +0000 Subject: ripple/minitrace: make syscall_bitflags! non-recursive Change-Id: I81047a4ac68e11a37882175732e4985c2f43a183 --- ripple/minitrace/src/main.rs | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'ripple/minitrace') 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 { - 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 { + SyscallArg::try_from_reg(reg).and_then(Self::from_bits) + } + } + )* }; - - () => {} } trait SyscallArg: Sized { -- cgit 1.4.1