Skip to content

Commit e2ac9e9

Browse files
committed
Make PageTable repr(C)
We removed repr(transparent) in the last commit because it is not compatible with repr(align). However we should still keep PageTable FFI-safe, so this commit adds repr(C) to it.
1 parent c62e0ff commit e2ac9e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/structures/paging/page_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ const ENTRY_COUNT: usize = 512;
170170
/// This struct implements the `Index` and `IndexMut` traits, so the entries can be accessed
171171
/// through index operations. For example, `page_table[15]` returns the 15th page table entry.
172172
#[repr(align(4096))]
173+
#[repr(C)]
173174
pub struct PageTable {
174175
entries: [PageTableEntry; ENTRY_COUNT],
175176
}

0 commit comments

Comments
 (0)