Skip to content

Commit b7a2de0

Browse files
committed
Added non-standard Linux SysconfVar variants
1 parent 5f859d1 commit b7a2de0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
66
## [Unreleased] - ReleaseDate
77
### Added
88

9+
- Added four non-standard Linux `SysconfVar` variants
10+
(#[1761](https://github.com/nix-rust/nix/pull/1761))
911
- Added const constructors for `TimeSpec` and `TimeVal`
1012
(#[1760](https://github.com/nix-rust/nix/pull/1760))
1113
- Added `aio_writev` and `aio_readv`.

src/unistd.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,6 +2668,19 @@ pub enum SysconfVar {
26682668
/// Integer value indicating version of the X/Open Portability Guide to
26692669
/// which the implementation conforms.
26702670
_XOPEN_VERSION = libc::_SC_XOPEN_VERSION,
2671+
/// The number of pages of physical memory. Note that it is possible for
2672+
/// the product of this value to overflow.
2673+
#[cfg(any(target_os="android", target_os="linux"))]
2674+
_PHYS_PAGES = libc::_SC_PHYS_PAGES,
2675+
/// The number of currently available pages of physical memory.
2676+
#[cfg(any(target_os="android", target_os="linux"))]
2677+
_AVPHYS_PAGES = libc::_SC_AVPHYS_PAGES,
2678+
/// The number of processors configured.
2679+
#[cfg(any(target_os="android", target_os="linux"))]
2680+
_NPROCESSORS_CONF = libc::_SC_NPROCESSORS_CONF,
2681+
/// The number of processors currently online (available).
2682+
#[cfg(any(target_os="android", target_os="linux"))]
2683+
_NPROCESSORS_ONLN = libc::_SC_NPROCESSORS_ONLN,
26712684
}
26722685

26732686
/// Get configurable system variables (see

0 commit comments

Comments
 (0)