-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Labels
A-layoutArea: Memory layout of typesArea: Memory layout of typesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Description
Here they explain the need for repr(C) structs that are both aligned and packed:
https://immunant.com/blog/2020/06/kernel_modules/
Their solution:
#[repr(C, align(64))]
pub struct xregs_state(pub xregs_state_Inner);
#[repr(C, packed)]
pub struct xregs_state_Inner {
// ...
}Perhaps it's worth supporting this directly.
Metadata
Metadata
Assignees
Labels
A-layoutArea: Memory layout of typesArea: Memory layout of typesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.