Skip to content

Commit fe2d2b9

Browse files
committed
implement Send+Sync for MemoryRegions
This also makes BootInfo Send+Sync. It's now possible to store BootInfo in a static without resorting to unsafe code.
1 parent 3cb6e6f commit fe2d2b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/src/info.rs

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ impl From<MemoryRegions> for &'static mut [MemoryRegion] {
132132
}
133133
}
134134

135+
unsafe impl Send for MemoryRegions {}
136+
unsafe impl Sync for MemoryRegions {}
137+
135138
/// Represent a physical memory region.
136139
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
137140
#[repr(C)]

0 commit comments

Comments
 (0)