diff options
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/resource.rs | 36 | ||||
-rw-r--r-- | src/sys/signal.rs | 2 | ||||
-rw-r--r-- | src/sys/statfs.rs | 4 |
3 files changed, 29 insertions, 13 deletions
diff --git a/src/sys/resource.rs b/src/sys/resource.rs index 80473e58..7f2927b4 100644 --- a/src/sys/resource.rs +++ b/src/sys/resource.rs @@ -24,12 +24,15 @@ cfg_if! { } libc_enum! { + /// Types of process resources. + /// /// The Resource enum is platform dependent. Check different platform - /// manuals for more details. Some platform links has been provided for - /// earier reference (non-exhaustive). + /// manuals for more details. Some platform links have been provided for + /// easier reference (non-exhaustive). /// /// * [Linux](https://man7.org/linux/man-pages/man2/getrlimit.2.html) /// * [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=setrlimit) + /// * [NetBSD](https://man.netbsd.org/setrlimit.2) // linux-gnu uses u_int as resource enum, which is implemented in libc as // well. @@ -49,11 +52,7 @@ libc_enum! { ), repr(i32))] #[non_exhaustive] pub enum Resource { - #[cfg(not(any( - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd" - )))] + #[cfg(not(any(target_os = "freebsd", target_os = "netbsd", target_os = "openbsd")))] #[cfg_attr(docsrs, doc(cfg(all())))] /// The maximum amount (in bytes) of virtual memory the process is /// allowed to map. @@ -83,7 +82,13 @@ libc_enum! { /// this process may establish. RLIMIT_LOCKS, - #[cfg(any(target_os = "android", target_os = "freebsd", target_os = "openbsd", target_os = "linux"))] + #[cfg(any( + target_os = "android", + target_os = "freebsd", + target_os = "openbsd", + target_os = "linux", + target_os = "netbsd" + ))] #[cfg_attr(docsrs, doc(cfg(all())))] /// The maximum size (in bytes) which a process may lock into memory /// using the mlock(2) system call. @@ -101,7 +106,13 @@ libc_enum! { /// setpriority or nice. RLIMIT_NICE, - #[cfg(any(target_os = "android", target_os = "freebsd", target_os = "openbsd", target_os = "linux"))] + #[cfg(any( + target_os = "android", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "linux", + ))] #[cfg_attr(docsrs, doc(cfg(all())))] /// The maximum number of simultaneous processes for this user id. RLIMIT_NPROC, @@ -112,7 +123,12 @@ libc_enum! { /// create. RLIMIT_NPTS, - #[cfg(any(target_os = "android", target_os = "freebsd", target_os = "openbsd", target_os = "linux"))] + #[cfg(any(target_os = "android", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "linux", + ))] #[cfg_attr(docsrs, doc(cfg(all())))] /// When there is memory pressure and swap is available, prioritize /// eviction of a process' resident pages beyond this amount (in bytes). diff --git a/src/sys/signal.rs b/src/sys/signal.rs index f85bf266..b655604d 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -866,7 +866,7 @@ pub fn pthread_sigmask(how: SigmaskHow, /// Examine and change blocked signals. /// -/// For more informations see the [`sigprocmask` man +/// For more information see the [`sigprocmask` man /// pages](https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html). pub fn sigprocmask(how: SigmaskHow, set: Option<&SigSet>, oldset: Option<&mut SigSet>) -> Result<()> { if set.is_none() && oldset.is_none() { diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index bfb94f48..62273475 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -536,7 +536,7 @@ impl Debug for Statfs { /// Describes a mounted file system. /// -/// The result is OS-dependent. For a portabable alternative, see +/// The result is OS-dependent. For a portable alternative, see /// [`statvfs`](crate::sys::statvfs::statvfs). /// /// # Arguments @@ -552,7 +552,7 @@ pub fn statfs<P: ?Sized + NixPath>(path: &P) -> Result<Statfs> { /// Describes a mounted file system. /// -/// The result is OS-dependent. For a portabable alternative, see +/// The result is OS-dependent. For a portable alternative, see /// [`fstatvfs`](crate::sys::statvfs::fstatvfs). /// /// # Arguments |