Add docs for PalEpoll

This commit is contained in:
Peter Limkilde Svendsen
2026-04-08 22:27:01 +02:00
parent d6261d3868
commit ac1467fb2f
+6
View File
@@ -4,9 +4,15 @@ use crate::{
platform::{Pal, types::c_int},
};
/// Platform abstraction for `epoll` functionality.
pub trait PalEpoll: Pal {
/// Platform implementation of [`epoll_create1()`](crate::header::sys_epoll::epoll_create1) from [`sys/epoll.h`](crate::header::sys_epoll).
fn epoll_create1(flags: c_int) -> Result<c_int>;
/// Platform implementation of [`epoll_ctl()`](crate::header::sys_epoll::epoll_ctl) from [`sys/epoll.h`](crate::header::sys_epoll).
unsafe fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut epoll_event) -> Result<()>;
/// Platform implementation of [`epoll_pwait()`](crate::header::sys_epoll::epoll_pwait) from [`sys/epoll.h`](crate::header::sys_epoll).
unsafe fn epoll_pwait(
epfd: c_int,
events: *mut epoll_event,