diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:25 +0000 |
commit | 5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch) | |
tree | 35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /vendor/rustix/src/mm | |
parent | Adding debian version 1.66.0+dfsg1-1. (diff) | |
download | rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip |
Merging upstream version 1.67.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 | 6 | ||||
-rw-r--r-- | vendor/rustix/src/mm/mmap.rs | 28 | ||||
-rw-r--r-- | vendor/rustix/src/mm/msync.rs | 6 | ||||
-rw-r--r-- | vendor/rustix/src/mm/userfaultfd.rs | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/vendor/rustix/src/mm/madvise.rs b/vendor/rustix/src/mm/madvise.rs index 317c3b515..cf13f951b 100644 --- a/vendor/rustix/src/mm/madvise.rs +++ b/vendor/rustix/src/mm/madvise.rs @@ -6,10 +6,10 @@ //! mutate the memory or have other side effects. #![allow(unsafe_code)] -use crate::{imp, io}; +use crate::{backend, io}; use core::ffi::c_void; -pub use imp::mm::types::Advice; +pub use backend::mm::types::Advice; /// `posix_madvise(addr, len, advice)`—Declares an expected access pattern /// for a memory-mapped file. @@ -31,5 +31,5 @@ pub use imp::mm::types::Advice; #[inline] #[doc(alias = "posix_madvise")] pub unsafe fn madvise(addr: *mut c_void, len: usize, advice: Advice) -> io::Result<()> { - imp::mm::syscalls::madvise(addr, len, advice) + backend::mm::syscalls::madvise(addr, len, advice) } diff --git a/vendor/rustix/src/mm/mmap.rs b/vendor/rustix/src/mm/mmap.rs index 7be02464e..31d3a77b3 100644 --- a/vendor/rustix/src/mm/mmap.rs +++ b/vendor/rustix/src/mm/mmap.rs @@ -6,15 +6,15 @@ //! semantics and are wildly unsafe. #![allow(unsafe_code)] -use crate::{imp, io}; +use crate::{backend, io}; +use backend::fd::AsFd; use core::ffi::c_void; -use imp::fd::AsFd; #[cfg(any(target_os = "android", target_os = "linux"))] -pub use imp::mm::types::MlockFlags; +pub use backend::mm::types::MlockFlags; #[cfg(any(linux_raw, all(libc, target_os = "linux")))] -pub use imp::mm::types::MremapFlags; -pub use imp::mm::types::{MapFlags, MprotectFlags, ProtFlags}; +pub use backend::mm::types::MremapFlags; +pub use backend::mm::types::{MapFlags, MprotectFlags, ProtFlags}; /// `mmap(ptr, len, prot, flags, fd, offset)`—Create a file-backed memory /// mapping. @@ -41,7 +41,7 @@ pub unsafe fn mmap<Fd: AsFd>( fd: Fd, offset: u64, ) -> io::Result<*mut c_void> { - imp::mm::syscalls::mmap(ptr, len, prot, flags, fd.as_fd(), offset) + backend::mm::syscalls::mmap(ptr, len, prot, flags, fd.as_fd(), offset) } /// `mmap(ptr, len, prot, MAP_ANONYMOUS | flags, -1, 0)`—Create an anonymous @@ -67,7 +67,7 @@ pub unsafe fn mmap_anonymous( prot: ProtFlags, flags: MapFlags, ) -> io::Result<*mut c_void> { - imp::mm::syscalls::mmap_anonymous(ptr, len, prot, flags) + backend::mm::syscalls::mmap_anonymous(ptr, len, prot, flags) } /// `munmap(ptr, len)` @@ -84,7 +84,7 @@ pub unsafe fn mmap_anonymous( /// [Linux]: https://man7.org/linux/man-pages/man2/munmap.2.html #[inline] pub unsafe fn munmap(ptr: *mut c_void, len: usize) -> io::Result<()> { - imp::mm::syscalls::munmap(ptr, len) + backend::mm::syscalls::munmap(ptr, len) } /// `mremap(old_address, old_size, new_size, flags)`—Resize, modify, @@ -109,7 +109,7 @@ pub unsafe fn mremap( new_size: usize, flags: MremapFlags, ) -> io::Result<*mut c_void> { - imp::mm::syscalls::mremap(old_address, old_size, new_size, flags) + backend::mm::syscalls::mremap(old_address, old_size, new_size, flags) } /// `mremap(old_address, old_size, new_size, MREMAP_FIXED | flags)`—Resize, @@ -136,7 +136,7 @@ pub unsafe fn mremap_fixed( flags: MremapFlags, new_address: *mut c_void, ) -> io::Result<*mut c_void> { - imp::mm::syscalls::mremap_fixed(old_address, old_size, new_size, flags, new_address) + backend::mm::syscalls::mremap_fixed(old_address, old_size, new_size, flags, new_address) } /// `mprotect(ptr, len, flags)` @@ -153,7 +153,7 @@ pub unsafe fn mremap_fixed( /// [Linux]: https://man7.org/linux/man-pages/man2/mprotect.2.html #[inline] pub unsafe fn mprotect(ptr: *mut c_void, len: usize, flags: MprotectFlags) -> io::Result<()> { - imp::mm::syscalls::mprotect(ptr, len, flags) + backend::mm::syscalls::mprotect(ptr, len, flags) } /// `mlock(ptr, len)`—Lock memory into RAM. @@ -177,7 +177,7 @@ pub unsafe fn mprotect(ptr: *mut c_void, len: usize, flags: MprotectFlags) -> io /// [Linux]: https://man7.org/linux/man-pages/man2/mlock.2.html #[inline] pub unsafe fn mlock(ptr: *mut c_void, len: usize) -> io::Result<()> { - imp::mm::syscalls::mlock(ptr, len) + backend::mm::syscalls::mlock(ptr, len) } /// `mlock2(ptr, len, flags)`—Lock memory into RAM, with @@ -204,7 +204,7 @@ pub unsafe fn mlock(ptr: *mut c_void, len: usize) -> io::Result<()> { #[inline] #[doc(alias = "mlock2")] pub unsafe fn mlock_with(ptr: *mut c_void, len: usize, flags: MlockFlags) -> io::Result<()> { - imp::mm::syscalls::mlock_with(ptr, len, flags) + backend::mm::syscalls::mlock_with(ptr, len, flags) } /// `munlock(ptr, len)`—Unlock memory. @@ -227,5 +227,5 @@ pub unsafe fn mlock_with(ptr: *mut c_void, len: usize, flags: MlockFlags) -> io: /// [Linux]: https://man7.org/linux/man-pages/man2/munlock.2.html #[inline] pub unsafe fn munlock(ptr: *mut c_void, len: usize) -> io::Result<()> { - imp::mm::syscalls::munlock(ptr, len) + backend::mm::syscalls::munlock(ptr, len) } diff --git a/vendor/rustix/src/mm/msync.rs b/vendor/rustix/src/mm/msync.rs index 7117a5067..3ca418fc4 100644 --- a/vendor/rustix/src/mm/msync.rs +++ b/vendor/rustix/src/mm/msync.rs @@ -6,10 +6,10 @@ //! memory or have other side effects. #![allow(unsafe_code)] -use crate::{imp, io}; +use crate::{backend, io}; use core::ffi::c_void; -pub use imp::mm::types::MsyncFlags; +pub use backend::mm::types::MsyncFlags; /// `msync(addr, len, flags)`—Synchronizes a memory-mapping with its backing /// storage. @@ -28,5 +28,5 @@ pub use imp::mm::types::MsyncFlags; /// [Linux `msync`]: https://man7.org/linux/man-pages/man2/msync.2.html #[inline] pub unsafe fn msync(addr: *mut c_void, len: usize, flags: MsyncFlags) -> io::Result<()> { - imp::mm::syscalls::msync(addr, len, flags) + backend::mm::syscalls::msync(addr, len, flags) } diff --git a/vendor/rustix/src/mm/userfaultfd.rs b/vendor/rustix/src/mm/userfaultfd.rs index 65b4a0dd8..201d54772 100644 --- a/vendor/rustix/src/mm/userfaultfd.rs +++ b/vendor/rustix/src/mm/userfaultfd.rs @@ -6,10 +6,10 @@ //! observe and manipulate process memory in magical ways. #![allow(unsafe_code)] -use crate::imp; -use crate::io::{self, OwnedFd}; +use crate::fd::OwnedFd; +use crate::{backend, io}; -pub use imp::mm::types::UserfaultfdFlags; +pub use backend::mm::types::UserfaultfdFlags; /// `userfaultfd(flags)` /// @@ -26,5 +26,5 @@ pub use imp::mm::types::UserfaultfdFlags; /// [Linux userfaultfd]: https://www.kernel.org/doc/Documentation/vm/userfaultfd.txt #[inline] pub unsafe fn userfaultfd(flags: UserfaultfdFlags) -> io::Result<OwnedFd> { - imp::mm::syscalls::userfaultfd(flags) + backend::mm::syscalls::userfaultfd(flags) } |