summary refs log tree commit diff
path: root/ripple
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2022-07-29 12:35:02 +0000
committeredef <edef@unfathomable.blue>2022-07-29 12:35:02 +0000
commit944c1fc7ed2ac0dc396bafea5ae92aca04dd139a (patch)
tree67739dd73d203f4dc51c902a29b9618a330a0968 /ripple
parent20c0466664a5ca6ac32c40e0cdeaef9afbed2c18 (diff)
downloadunf-legacy-944c1fc7ed2ac0dc396bafea5ae92aca04dd139a.tar.zst
ripple/minitrace: make syscall_bitflags! non-recursive
Change-Id: I81047a4ac68e11a37882175732e4985c2f43a183
Diffstat (limited to 'ripple')
-rw-r--r--ripple/minitrace/src/main.rs40
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 {