sinf 0.1.0

Library for obtaining in-depth system information at both the hardware and software levels
Documentation
// Required because `kinfo_proc` does not implement `Send` (it contains pointers).
pub(crate) struct WrapMap<'a>(
    pub std::cell::UnsafeCell<&'a mut std::collections::HashMap<crate::Pid, crate::Process>>,
);

unsafe impl Send for WrapMap<'_> {}
unsafe impl Sync for WrapMap<'_> {}

#[repr(transparent)]
pub(crate) struct KInfoProc(libc::kinfo_proc);

unsafe impl Send for KInfoProc {}
unsafe impl Sync for KInfoProc {}

impl std::ops::Deref for KInfoProc {
    type Target = libc::kinfo_proc;

    fn deref(&self) -> &Self::Target {
        &self.0
    }
}