Skip to content

Allow Mmio to work with const fn

Jacob Lorentzon requested to merge 4lDO2/syscall:improved-mmio into master

Allows Mmio to be initialized in const contexts, using Mmio::from. Also adds Mmio::uninit (replacement for Mmio::new), Mmio::zeroed, Mmio::from (const fn), and deprecates Mmio::new because it's unsound as Mmios can be dereferenced any time.

Allows syscall::Result to optionally take a different error parameter as well, by changing

type Result<T> = result::Result<T, Error>;

to

type Result<T, E = Error> = result::Result<T, E>;

Merge request reports