From ce76aa11b2d755c225d2dfa92ca55525035a00fc Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sat, 27 Sep 2025 15:14:47 +0300 Subject: [PATCH] core/storage: Mark Page as Send and Sync --- core/storage/pager.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/storage/pager.rs b/core/storage/pager.rs index c4c4df620..0b85be394 100644 --- a/core/storage/pager.rs +++ b/core/storage/pager.rs @@ -168,6 +168,11 @@ pub struct Page { pub inner: UnsafeCell, } +// SAFETY: Page is thread-safe because we use atomic page flags to serialize +// concurrent modifications. +unsafe impl Send for Page {} +unsafe impl Sync for Page {} + // Concurrency control of pages will be handled by the pager, we won't wrap Page with RwLock // because that is bad bad. pub type PageRef = Arc;