mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2026-04-18 22:28:16 -04:00
Add a new struct, `InterruptableFut` which allows signal short-circuiting logic. If a future within the kernel's syscall logic is wrapped in a `InterruptableFut`, then a wakeup with any pending signals causes the underlying future to be dropped and it's operation cancelled. Provide a `InterruptResult` enum to allow the caller to know whether the operation was interrupted and allows them to take appropriate action. Typically exiting with `-EINTR`. Finally, provide a blanket implementation for all futures, allowing then to call `.interruptable()` to easily wrap any future.