From fe2d2b936e41b8fe6ab5d8d650a82a9e2bd37b60 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Tue, 1 Apr 2025 19:56:43 +0200 Subject: [PATCH] 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. --- api/src/info.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/info.rs b/api/src/info.rs index d8962d62..d934c532 100644 --- a/api/src/info.rs +++ b/api/src/info.rs @@ -132,6 +132,9 @@ impl From for &'static mut [MemoryRegion] { } } +unsafe impl Send for MemoryRegions {} +unsafe impl Sync for MemoryRegions {} + /// Represent a physical memory region. #[derive(Debug, Copy, Clone, Eq, PartialEq)] #[repr(C)]