pub struct PollTable { /* private fields */ }
Expand description
Wraps the kernel’s struct poll_table_struct
.
Invariants
The pointer PollTable::ptr
is null or valid.
Implementations
sourceimpl PollTable
impl PollTable
sourcepub unsafe fn register_wait<'a>(&self, file: &'a File, cv: &'a CondVar)
pub unsafe fn register_wait<'a>(&self, file: &'a File, cv: &'a CondVar)
Associates the given file and condition variable to this poll table. It means notifying the
condition variable will notify the poll table as well; additionally, the association
between the condition variable and the file will automatically be undone by the kernel when
the file is destructed. To unilaterally remove the association before then, one can call
CondVar::free_waiters
.
Safety
If the condition variable is destroyed before the file, then CondVar::free_waiters
must
be called to ensure that all waiters are flushed out.
Auto Trait Implementations
impl RefUnwindSafe for PollTable
impl !Send for PollTable
impl !Sync for PollTable
impl Unpin for PollTable
impl UnwindSafe for PollTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more