pub struct Pager { /* private fields */ }Expand description
A simple pager implementation. One port per pager but a pager can service many files.
Implementations§
Source§impl Pager
impl Pager
Sourcepub fn new(backing_vmo: Vmo, block_size: u64) -> Result<Self, Errno>
pub fn new(backing_vmo: Vmo, block_size: u64) -> Result<Self, Errno>
Returns a new pager. block_size shouldn’t be too big (which might cause overflows) and it
should be a power of 2.
Sourcepub fn start_threads(self: &Arc<Self>)
pub fn start_threads(self: &Arc<Self>)
Starts the pager threads.
Sourcepub fn register(
&self,
name: &str,
inode_num: u32,
size: u64,
extents: Box<[PagerExtent]>,
) -> Result<Vmo, Status>
pub fn register( &self, name: &str, inode_num: u32, size: u64, extents: Box<[PagerExtent]>, ) -> Result<Vmo, Status>
Registers the file with the pager. Returns a child VMO. extents should be sorted.
Sourcepub fn run_pager_thread(&self)
pub fn run_pager_thread(&self)
Dedicated thread responsible for listening on port and supplying pages as needed. More than one pager thread can be running concurrently.
Auto Trait Implementations§
impl !Freeze for Pager
impl !RefUnwindSafe for Pager
impl Send for Pager
impl Sync for Pager
impl Unpin for Pager
impl UnwindSafe for Pager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.