diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:42 +0000 |
commit | 837b550238aa671a591ccf282dddeab29cadb206 (patch) | |
tree | 914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/rustix/src/mm | |
parent | Adding debian version 1.70.0+dfsg2-1. (diff) | |
download | rustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz rustc-837b550238aa671a591ccf282dddeab29cadb206.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/mm')
-rw-r--r-- | vendor/rustix/src/mm/madvise.rs | 14 | ||||
-rw-r--r-- | vendor/rustix/src/mm/mmap.rs | 92 | ||||
-rw-r--r-- | vendor/rustix/src/mm/msync.rs | 18 |
3 files changed, 118 insertions, 6 deletions
diff --git a/vendor/rustix/src/mm/madvise.rs b/vendor/rustix/src/mm/madvise.rs index cf13f951b..868a31a5e 100644 --- a/vendor/rustix/src/mm/madvise.rs +++ b/vendor/rustix/src/mm/madvise.rs @@ -24,10 +24,24 @@ pub use backend::mm::types::Advice; /// - [POSIX] /// - [Linux `madvise`] /// - [Linux `posix_madvise`] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_madvise.html /// [Linux `madvise`]: https://man7.org/linux/man-pages/man2/madvise.2.html /// [Linux `posix_madvise`]: https://man7.org/linux/man-pages/man3/posix_madvise.3.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/madvise.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=madvise&sektion=2 +/// [NetBSD]: https://man.netbsd.org/madvise.2 +/// [OpenBSD]: https://man.openbsd.org/madvise.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=madvise§ion=2 +/// [illumos]: https://illumos.org/man/3C/madvise +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html#index-madvise #[inline] #[doc(alias = "posix_madvise")] pub unsafe fn madvise(addr: *mut c_void, len: usize, advice: Advice) -> io::Result<()> { diff --git a/vendor/rustix/src/mm/mmap.rs b/vendor/rustix/src/mm/mmap.rs index 715c662ec..8d4b7e23b 100644 --- a/vendor/rustix/src/mm/mmap.rs +++ b/vendor/rustix/src/mm/mmap.rs @@ -29,9 +29,23 @@ pub use backend::mm::types::{MapFlags, MprotectFlags, ProtFlags}; /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html /// [Linux]: https://man7.org/linux/man-pages/man2/mmap.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mmap.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=mmap&sektion=2 +/// [NetBSD]: https://man.netbsd.org/mmap.2 +/// [OpenBSD]: https://man.openbsd.org/mmap.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=mmap§ion=2 +/// [illumos]: https://illumos.org/man/2/mmap +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html#index-mmap #[inline] pub unsafe fn mmap<Fd: AsFd>( ptr: *mut c_void, @@ -56,9 +70,23 @@ pub unsafe fn mmap<Fd: AsFd>( /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html /// [Linux]: https://man7.org/linux/man-pages/man2/mmap.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mmap.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=mmap&sektion=2 +/// [NetBSD]: https://man.netbsd.org/mmap.2 +/// [OpenBSD]: https://man.openbsd.org/mmap.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=mmap§ion=2 +/// [illumos]: https://illumos.org/man/2/mmap +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html#index-mmap #[inline] #[doc(alias = "mmap")] pub unsafe fn mmap_anonymous( @@ -70,7 +98,7 @@ pub unsafe fn mmap_anonymous( backend::mm::syscalls::mmap_anonymous(ptr, len, prot, flags) } -/// `munmap(ptr, len)` +/// `munmap(ptr, len)`—Remove a memory mapping. /// /// # Safety /// @@ -79,9 +107,23 @@ pub unsafe fn mmap_anonymous( /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/munmap.html /// [Linux]: https://man7.org/linux/man-pages/man2/munmap.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/munmap.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=munmap&sektion=2 +/// [NetBSD]: https://man.netbsd.org/munmap.2 +/// [OpenBSD]: https://man.openbsd.org/munmap.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=munmap§ion=2 +/// [illumos]: https://illumos.org/man/2/munmap +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html#index-munmap #[inline] pub unsafe fn munmap(ptr: *mut c_void, len: usize) -> io::Result<()> { backend::mm::syscalls::munmap(ptr, len) @@ -139,7 +181,8 @@ pub unsafe fn mremap_fixed( backend::mm::syscalls::mremap_fixed(old_address, old_size, new_size, flags, new_address) } -/// `mprotect(ptr, len, flags)` +/// `mprotect(ptr, len, flags)`—Change the protection flags of a region of +/// memory. /// /// # Safety /// @@ -148,9 +191,21 @@ pub unsafe fn mremap_fixed( /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mprotect.html /// [Linux]: https://man7.org/linux/man-pages/man2/mprotect.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mprotect.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=mprotect&sektion=2 +/// [NetBSD]: https://man.netbsd.org/mprotect.2 +/// [OpenBSD]: https://man.openbsd.org/mprotect.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=mprotect§ion=2 +/// [illumos]: https://illumos.org/man/2/mprotect #[inline] pub unsafe fn mprotect(ptr: *mut c_void, len: usize, flags: MprotectFlags) -> io::Result<()> { backend::mm::syscalls::mprotect(ptr, len, flags) @@ -172,16 +227,29 @@ pub unsafe fn mprotect(ptr: *mut c_void, len: usize, flags: MprotectFlags) -> io /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mlock.html /// [Linux]: https://man7.org/linux/man-pages/man2/mlock.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mlock.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=mlock&sektion=2 +/// [NetBSD]: https://man.netbsd.org/mlock.2 +/// [OpenBSD]: https://man.openbsd.org/mlock.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=mlock§ion=2 +/// [illumos]: https://illumos.org/man/3C/mlock +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Page-Lock-Functions.html#index-mlock #[inline] pub unsafe fn mlock(ptr: *mut c_void, len: usize) -> io::Result<()> { backend::mm::syscalls::mlock(ptr, len) } -/// `mlock2(ptr, len, flags)`—Lock memory into RAM, with -/// flags. +/// `mlock2(ptr, len, flags)`—Lock memory into RAM, with flags. /// /// `mlock_with` is the same as [`mlock`] but adds an additional flags operand. /// @@ -198,8 +266,10 @@ pub unsafe fn mlock(ptr: *mut c_void, len: usize) -> io::Result<()> { /// /// # References /// - [Linux] +/// - [glibc] /// /// [Linux]: https://man7.org/linux/man-pages/man2/mlock2.2.html +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Page-Lock-Functions.html#index-mlock2 #[cfg(any(target_os = "android", target_os = "linux"))] #[inline] #[doc(alias = "mlock2")] @@ -222,9 +292,23 @@ pub unsafe fn mlock_with(ptr: *mut c_void, len: usize, flags: MlockFlags) -> io: /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/munlock.html /// [Linux]: https://man7.org/linux/man-pages/man2/munlock.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/munlock.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=munlock&sektion=2 +/// [NetBSD]: https://man.netbsd.org/munlock.2 +/// [OpenBSD]: https://man.openbsd.org/munlock.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=munlock§ion=2 +/// [illumos]: https://illumos.org/man/3C/munlock +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Page-Lock-Functions.html#index-munlock #[inline] pub unsafe fn munlock(ptr: *mut c_void, len: usize) -> io::Result<()> { backend::mm::syscalls::munlock(ptr, len) diff --git a/vendor/rustix/src/mm/msync.rs b/vendor/rustix/src/mm/msync.rs index 3ca418fc4..0306e36b9 100644 --- a/vendor/rustix/src/mm/msync.rs +++ b/vendor/rustix/src/mm/msync.rs @@ -22,10 +22,24 @@ pub use backend::mm::types::MsyncFlags; /// /// # References /// - [POSIX] -/// - [Linux `msync`] +/// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/msync.html -/// [Linux `msync`]: https://man7.org/linux/man-pages/man2/msync.2.html +/// [Linux]: https://man7.org/linux/man-pages/man2/msync.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/msync.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=msync&sektion=2 +/// [NetBSD]: https://man.netbsd.org/msync.2 +/// [OpenBSD]: https://man.openbsd.org/msync.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=msync§ion=2 +/// [illumos]: https://illumos.org/man/3C/msync +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html#index-msync #[inline] pub unsafe fn msync(addr: *mut c_void, len: usize, flags: MsyncFlags) -> io::Result<()> { backend::mm::syscalls::msync(addr, len, flags) |