Skip to content

Commit e6f01f2

Browse files
committed
Document mman.rs
No documentation provided for MADV_CAN_REUSE, as Darwin doesn't actually document its functionality.
1 parent 7d03441 commit e6f01f2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/sys/mman.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ libc_enum!{
299299
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
300300
#[cfg_attr(docsrs, doc(cfg(all())))]
301301
MADV_CORE,
302+
/// This process should not be killed when swap space is exhausted.
302303
#[cfg(any(target_os = "freebsd"))]
303304
#[cfg_attr(docsrs, doc(cfg(all())))]
304305
MADV_PROTECT,
@@ -314,14 +315,18 @@ libc_enum!{
314315
#[cfg(any(target_os = "ios", target_os = "macos"))]
315316
#[cfg_attr(docsrs, doc(cfg(all())))]
316317
MADV_ZERO_WIRED_PAGES,
318+
/// Pages can be reused (by anyone).
317319
#[cfg(any(target_os = "ios", target_os = "macos"))]
318320
#[cfg_attr(docsrs, doc(cfg(all())))]
319321
MADV_FREE_REUSABLE,
322+
/// Caller wants to reuse those pages.
320323
#[cfg(any(target_os = "ios", target_os = "macos"))]
321324
#[cfg_attr(docsrs, doc(cfg(all())))]
322325
MADV_FREE_REUSE,
326+
// Darwin doesn't document this flag's behavior.
323327
#[cfg(any(target_os = "ios", target_os = "macos"))]
324328
#[cfg_attr(docsrs, doc(cfg(all())))]
329+
#[allow(missing_docs)]
325330
MADV_CAN_REUSE,
326331
}
327332
}

src/sys/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ feature! {
5555
#[cfg(not(target_os = "redox"))]
5656
feature! {
5757
#![feature = "mman"]
58-
#[allow(missing_docs)]
5958
pub mod mman;
6059
}
6160

0 commit comments

Comments
 (0)