macro_rules! check_arch_independent_same_layout {
() => { ... };
(
$type_name1:ty = $type_name2:ident { $($($field1:ident).+ =>
$($field2:ident).+),* $(,)? } $($token:tt)*
) => { ... };
}Expand description
Ensure a custom type has the same layout as an ABI independant uapi type
Usage:
check_arch_independent_same_layout! {
Type = UapiType {
type_field1 => uapi_type_field1,
type_field2 => uapi_type_field2,
...
}
}