summaryrefslogtreecommitdiff
path: root/src/sys/mman.rs
AgeCommit message (Collapse)Author
2022-12-09refactor: take AsFd by valueSteve Lau
2022-12-05Use I/O safety in sys::mmanAlan Somers
2022-12-04More annoying formatting changesAlex Saveau
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-11-20mmap non-zero lengthJonathan
2022-11-20mmap addrJonathan
2022-11-06Reformat everythingAlex Saveau
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-05-14add haiku supportAl Hoang
* enabled as much functionality and defines that match updated libc definitions for haiku
2022-02-02Document mman.rsRyan Zoeller
No documentation provided for MADV_CAN_REUSE, as Darwin doesn't actually document its functionality.
2022-01-18Add MAP_FIXED_NOREPLACE on LinuxRyan Zoeller
2022-01-02Correct MAP_FIXED documentation for NetBSDRyan Zoeller
The previous documentation described the default behavior, rather than the behavior when the flag was set. Also fix a test which is failing due to passing this flag erroneously.
2021-12-20feature-gate most Nix functionsVincent Dagonneau
Using features reduces build time and size for consumer crates. By default all features are enabled.
2021-12-04Merge #1601bors[bot]
1601: Update `mman` related docs r=rtzoeller a=schctl Added docs for `memfd_create`, `shm_open`, and `shm_unlink`, and some man-page and intra doc links. Co-authored-by: Sachin Cherian <sachinctl@protonmail.com>
2021-12-03Update `mman` related docsSachin Cherian
- Add docs for `memfd_create`, `shm_open`, and `shm_unlink` - Add man-page links - Remove` #[allow(missing_docs)]`on the `memfd` module
2021-11-02MapFlags::MAP_ALIGNED_SUPER not exposed on FreeBSD due to typoS.J.R. van Schaik
2021-10-16Correct definition of MADV_SOFT_OFFLINE on ppcAlan Somers
Rust has no "ppc" target_arch. It should be "powerpc" or "powerpc64".
2021-09-19Actually connect the mman tests to the buildAlan Somers
This was an oversight from #1306. Reported-by: @ocadaruma
2021-09-19Merge #1531bors[bot]
1531: mman add MAP_CONCEAL mmap flag for openbsd r=asomers a=devnexen Co-authored-by: David Carlier <devnexen@gmail.com>
2021-09-19mman add MAP_CONCEAL mmap flag for openbsdDavid Carlier
2021-09-19Merge #1532bors[bot]
1532: mman MAP_JIT flag documentation. r=asomers a=devnexen Co-authored-by: David Carlier <devnexen@gmail.com>
2021-09-19Merge #1522bors[bot]
1522: mman mod adding MAP_ALIGNED_SUPER flag for freebsd. r=asomers a=devnexen Co-authored-by: David Carlier <devnexen@gmail.com>
2021-09-19Clippy cleanupAlan Somers
And this time, start running Clippy in CI
2021-09-19mman MAP_JIT flag documentation.David Carlier
2021-09-19mman mod adding MAP_ALIGNED_SUPER flag for freebsd.David Carlier
2021-09-18mman: add MAP_EXCL flag for freebsd.David Carlier
2021-09-12Merge #1520 #1523bors[bot]
1520: mman module netbsd additions. r=asomers a=devnexen 1523: mman: add MAP_STACK to openbsd which is needed … r=asomers a=devnexen …to created stack mappings Co-authored-by: David Carlier <devnexen@gmail.com>
2021-09-12mman module netbsd additions.David Carlier
2021-09-12mman: add MAP_STACK to openbsd which is needed to created stack mappingsDavid Carlier
2021-08-27Fix compilation warningsRyan Zoeller
2021-07-24Mark most C-derived enums as non_exhaustiveAlan Somers
Since libc may add new variants at any time, Nix's consumers should not use exhaustive match patterns. Fixes #1182
2021-07-07Overhaul Nix's error typesAlan Somers
For many of Nix's consumers it be convenient to easily convert a Nix error into a std::io::Error. That's currently not possible because of the InvalidPath, InvalidUtf8, and UnsupportedOperation types that have no equivalent in std::io::Error. However, very few of Nix's public APIs actually return those unusual errors. So a more useful API would be for Nix's standard error type to implement Into<std::io::Error>. This commit makes Error a simple NewType around Errno. For most functions it's a drop-in replacement. There are only three exceptions: * clearenv now returns a bespoke error type. It was the only Nix function whose error couldn't be cleanly mapped onto an Errno. * sys::signal::signal now returns Error(Errno::ENOTSUP) instead of Error::UnsupportedOperation when the user passes an incompatible argument to `handler`. * When a NixPath exceeds PATH_MAX, it will now return Error(Errno::ENAMETOOLONG) instead of Error::InvalidPath. In the latter two cases there is now some abiguity about whether the error code was generated by Nix or by the OS. But I think the ambiguity is worth it for the sake of being able to implement Into<io::Error>. This commit also introduces Error::Sys() as a migration aid. Previously that as an enum variant. Now it's a function, but it will work in many of the same contexts as the original. Fixes #1155
2021-05-13Use https instead of httpRyan Zoeller
2020-10-13Add wrapper for mremapJim Newsome
2020-06-27misc clippy cleanupAlan Somers
2020-05-31Convert the crate to edition 2018Alan Somers
2020-04-21Add the MAP_HUGE_<SIZE> flags for linux.GuillaumeDIDIER
Closes #1194 Use git libc for development (Remember to reset this to released version for the next nix release, once libc has released >=0.2.69)
2019-06-02Fix the build on Linux/mips with recent libcAlan Somers
libc just undefined MADV_SOFT_OFFLINE on mips. https://github.com/rust-lang/libc/pull/1365 Fixes #1074
2019-01-22add `mman::mprotect`Adam C. Foltzer
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-06-03Fix compilation on aarch64-unknown-linux-muslBryant Mairs
2018-03-27add docs for memory locking functionsAndreas Fackler
2018-03-27add mlockall and munlockallAndreas Fackler
2018-01-28Fail to compile for any unused codeBryant Mairs
2018-01-28Deny unused qualificationsBryant Mairs
2017-12-11Merge #806bors[bot]
806: Cleanup all doc warnings r=asomers a=Susurrus With the impending switch to Pulldown as the default doc generator, warnings have been enabled for incompatible syntax. This fixes all of said warnings.
2017-12-10Cleanup doc warningsBryant Mairs
With the impending switch to Pulldown as the default doc generator, warnings have been enabled for incompatible syntax. This fixes all of said warnings.
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-08-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
2017-08-11Use libc for FFI functions and constantsBryant Mairs
2017-06-18Fix BSD errorequal-l2
2017-06-18Update bitflags to 0.9equal-l2