core/io: Switch to Arc<Completion>

This commit is contained in:
Pekka Enberg 2025-05-22 09:32:16 +03:00
parent 21535018aa
commit eca9a5b703
14 changed files with 78 additions and 63 deletions

View file

@ -14,9 +14,9 @@ use std::{
pub trait File: Send + Sync {
fn lock_file(&self, exclusive: bool) -> Result<()>;
fn unlock_file(&self) -> Result<()>;
fn pread(&self, pos: usize, c: Completion) -> Result<()>;
fn pwrite(&self, pos: usize, buffer: Arc<RefCell<Buffer>>, c: Completion) -> Result<()>;
fn sync(&self, c: Completion) -> Result<()>;
fn pread(&self, pos: usize, c: Arc<Completion>) -> Result<()>;
fn pwrite(&self, pos: usize, buffer: Arc<RefCell<Buffer>>, c: Arc<Completion>) -> Result<()>;
fn sync(&self, c: Arc<Completion>) -> Result<()>;
fn size(&self) -> Result<u64>;
}