Skip to content

Commit b8d7e00

Browse files
authored
Miscellaneous documentation cleanups. (#883)
1 parent 30a5ae1 commit b8d7e00

7 files changed

Lines changed: 24 additions & 21 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ jobs:
209209
- run: cargo check -Z build-std --target aarch64-unknown-linux-gnu_ilp32 --features=all-apis
210210
# Omit --all-targets on haiku because not all the tests build yet.
211211
- run: cargo check -Z build-std --target x86_64-unknown-haiku --features=all-apis
212-
# x86_64-uwp-windows-msvc isn't currently working.
213-
#- run: cargo check -Z build-std --target x86_64-uwp-windows-msvc --all-targets --features=all-apis
212+
- run: cargo check -Z build-std --target x86_64-uwp-windows-msvc --all-targets --features=all-apis
214213
- run: cargo check -Z build-std --target=riscv32imc-esp-espidf --features=all-apis
215214
- run: cargo check -Z build-std --target=aarch64-unknown-nto-qnx710 --features=all-apis
216215
- run: cargo check -Z build-std --target=x86_64-pc-nto-qnx710 --features=all-apis

src/backend/libc/mm/syscalls.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,11 @@ pub(crate) unsafe fn userfaultfd(flags: UserfaultfdFlags) -> io::Result<OwnedFd>
225225

226226
/// Locks all pages mapped into the address space of the calling process.
227227
///
228-
/// This includes the pages of the code, data and stack segment, as well as shared libraries,
229-
/// user space kernel data, shared memory, and memory-mapped files. All mapped pages are
230-
/// guaranteed to be resident in RAM when the call returns successfully;
231-
/// the pages are guaranteed to stay in RAM until later unlocked.
228+
/// This includes the pages of the code, data and stack segment, as well as
229+
/// shared libraries, user space kernel data, shared memory, and memory-mapped
230+
/// files. All mapped pages are guaranteed to be resident in RAM when the call
231+
/// returns successfully; the pages are guaranteed to stay in RAM until later
232+
/// unlocked.
232233
#[inline]
233234
#[cfg(any(linux_kernel, freebsdlike, netbsdlike))]
234235
pub(crate) fn mlockall(flags: MlockAllFlags) -> io::Result<()> {

src/backend/linux_raw/mm/syscalls.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,11 @@ pub(crate) unsafe fn userfaultfd(flags: UserfaultfdFlags) -> io::Result<OwnedFd>
215215

216216
/// Locks all pages mapped into the address space of the calling process.
217217
///
218-
/// This includes the pages of the code, data and stack segment, as well as shared libraries,
219-
/// user space kernel data, shared memory, and memory-mapped files. All mapped pages are
220-
/// guaranteed to be resident in RAM when the call returns successfully;
221-
/// the pages are guaranteed to stay in RAM until later unlocked.
218+
/// This includes the pages of the code, data and stack segment, as well as
219+
/// shared libraries, user space kernel data, shared memory, and memory-mapped
220+
/// files. All mapped pages are guaranteed to be resident in RAM when the call
221+
/// returns successfully; the pages are guaranteed to stay in RAM until later
222+
/// unlocked.
222223
#[inline]
223224
#[cfg(any(linux_kernel, freebsdlike, netbsdlike))]
224225
pub(crate) fn mlockall(flags: MlockAllFlags) -> io::Result<()> {

src/mm/mmap.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,11 @@ pub unsafe fn munlock(ptr: *mut c_void, len: usize) -> io::Result<()> {
345345

346346
/// Locks all pages mapped into the address space of the calling process.
347347
///
348-
/// This includes the pages of the code, data and stack segment, as well as shared libraries,
349-
/// user space kernel data, shared memory, and memory-mapped files. All mapped pages are
350-
/// guaranteed to be resident in RAM when the call returns successfully;
351-
/// the pages are guaranteed to stay in RAM until later unlocked.
348+
/// This includes the pages of the code, data and stack segment, as well as
349+
/// shared libraries, user space kernel data, shared memory, and memory-mapped
350+
/// files. All mapped pages are guaranteed to be resident in RAM when the call
351+
/// returns successfully; the pages are guaranteed to stay in RAM until later
352+
/// unlocked.
352353
///
353354
/// # References
354355
/// - [POSIX]
@@ -378,9 +379,10 @@ pub fn mlockall(flags: MlockAllFlags) -> io::Result<()> {
378379
///
379380
/// # Warnings
380381
///
381-
/// This function is aware of all the memory pages in the process, as if it were a debugger.
382-
/// It unlocks all the pages, which could potentially compromise security assumptions made by
383-
/// code about memory it has encapsulated.
382+
/// This function is aware of all the memory pages in the process, as if it
383+
/// were a debugger. It unlocks all the pages, which could potentially
384+
/// compromise security assumptions made by code about memory it has
385+
/// encapsulated.
384386
///
385387
/// # References
386388
/// - [POSIX]

src/process/wait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::fd::BorrowedFd;
99
use crate::backend::process::wait::SiginfoExt;
1010

1111
bitflags! {
12-
/// Options for modifying the behavior of wait/waitpid
12+
/// Options for modifying the behavior of [`wait`]/[`waitpid`].
1313
#[repr(transparent)]
1414
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
1515
pub struct WaitOptions: u32 {

src/pty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::{fd::FromRawFd, ioctl};
2323
bitflags::bitflags! {
2424
/// `O_*` flags for use with [`openpt`] and [`ioctl_tiocgptpeer`].
2525
///
26-
/// [`ioctl_tiocgtpeer`]: https://docs.rs/rustix/*/x86_64-unknown-linux-gnu/rustix/pty/fn.ioctl_tiocgtpeer.html
26+
/// [`ioctl_tiocgtpeer`]: https://docs.rs/rustix/*/x86_64-unknown-linux-gnu/rustix/pty/fn.ioctl_tiocgptpeer.html
2727
#[repr(transparent)]
2828
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
2929
pub struct OpenptFlags: u32 {

src/runtime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub unsafe fn arm_set_tls(data: *mut c_void) -> io::Result<()> {
8989
backend::runtime::syscalls::tls::arm_set_tls(data)
9090
}
9191

92-
/// `prctl(PR_SET_FS, data)`—Set the x86_64 `fs` register.
92+
/// `prctl(PR_SET_FS, data)`—Set the x86-64 `fs` register.
9393
///
9494
/// # Safety
9595
///
@@ -101,7 +101,7 @@ pub unsafe fn set_fs(data: *mut c_void) {
101101
backend::runtime::syscalls::tls::set_fs(data)
102102
}
103103

104-
/// Set the x86_64 thread ID address.
104+
/// Set the x86-64 thread ID address.
105105
///
106106
/// # Safety
107107
///

0 commit comments

Comments
 (0)