⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

EpollNode

Struct EpollNode 

Source
pub struct EpollNode { /* private fields */ }
Expand description

VfsNode wrapper around an epoll instance.

Allows epoll_create1() to return a real file descriptor. musl expects to be able to close() the epoll fd. read()/write() are not supported.

Implementations§

Source§

impl EpollNode

Source

pub fn new(epoll_id: u32) -> Self

Source

pub fn epoll_id(&self) -> u32

Get the internal epoll ID (for epoll_ctl/epoll_wait).

Trait Implementations§

Source§

impl Drop for EpollNode

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl VfsNode for EpollNode

Source§

fn node_type(&self) -> NodeType

Node type query (also serves as vtable slot padding for AArch64)
Source§

fn read(&self, _offset: usize, _buffer: &mut [u8]) -> Result<usize, KernelError>

Read data from the node
Source§

fn write(&self, _offset: usize, _data: &[u8]) -> Result<usize, KernelError>

Write data to the node
Source§

fn as_any(&self) -> Option<&dyn Any>

Downcast to &dyn core::any::Any for type-specific operations. Read more
Source§

fn metadata(&self) -> Result<Metadata, KernelError>

Get metadata for the node
Source§

fn readdir(&self) -> Result<Vec<DirEntry>, KernelError>

List directory entries (if this is a directory)
Source§

fn lookup(&self, _name: &str) -> Result<Arc<dyn VfsNode>, KernelError>

Look up a child node by name (if this is a directory)
Source§

fn create( &self, _name: &str, _permissions: Permissions, ) -> Result<Arc<dyn VfsNode>, KernelError>

Create a new file in this directory
Source§

fn mkdir( &self, _name: &str, _permissions: Permissions, ) -> Result<Arc<dyn VfsNode>, KernelError>

Create a new directory in this directory
Remove a file or empty directory
Source§

fn truncate(&self, _size: usize) -> Result<(), KernelError>

Truncate the file to the specified size
Create a hard link to this node
Create a symbolic link in this directory. Read more
Read the target of a symbolic link. Read more
Source§

fn chmod(&self, _permissions: Permissions) -> Result<(), KernelError>

Change permissions on this node
Source§

fn poll_readiness(&self) -> u16

Poll readiness for I/O multiplexing (poll/epoll). Read more

Auto Trait Implementations§

§

impl Freeze for EpollNode

§

impl RefUnwindSafe for EpollNode

§

impl Send for EpollNode

§

impl Sync for EpollNode

§

impl Unpin for EpollNode

§

impl UnwindSafe for EpollNode

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.