summaryrefslogtreecommitdiff
path: root/src/sys/timerfd.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-02-06 23:31:42 +0000
committerGitHub <noreply@github.com>2022-02-06 23:31:42 +0000
commit2038ce6b99c7287c1d80c5df2fcc9cf2de131a32 (patch)
treed2c37caf5474bf351914027ec2ada5a45e7458ee /src/sys/timerfd.rs
parent0bd56d96e3b2a4b19ef539e6bd01f3441ecfed1d (diff)
parent7baf6d12c88bfba20b77c68353826702c7248fcd (diff)
downloadnix-2038ce6b99c7287c1d80c5df2fcc9cf2de131a32.zip
Merge #1653
1653: Document inotify, mman, personality, reboot, timerfd r=asomers a=rtzoeller Document the `inotify`, `mman`, `personality`, `reboot`, and `timerfd` modules. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
Diffstat (limited to 'src/sys/timerfd.rs')
-rw-r--r--src/sys/timerfd.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sys/timerfd.rs b/src/sys/timerfd.rs
index bc5a75d4..18acbae3 100644
--- a/src/sys/timerfd.rs
+++ b/src/sys/timerfd.rs
@@ -60,10 +60,19 @@ libc_enum! {
#[repr(i32)]
#[non_exhaustive]
pub enum ClockId {
+ /// A settable system-wide real-time clock.
CLOCK_REALTIME,
+ /// A non-settable monotonically increasing clock.
+ ///
+ /// Does not change after system startup.
+ /// Does not measure time while the system is suspended.
CLOCK_MONOTONIC,
+ /// Like `CLOCK_MONOTONIC`, except that `CLOCK_BOOTTIME` includes the time
+ /// that the system was suspended.
CLOCK_BOOTTIME,
+ /// Like `CLOCK_REALTIME`, but will wake the system if it is suspended.
CLOCK_REALTIME_ALARM,
+ /// Like `CLOCK_BOOTTIME`, but will wake the system if it is suspended.
CLOCK_BOOTTIME_ALARM,
}
}
@@ -72,7 +81,9 @@ libc_bitflags! {
/// Additional flags to change the behaviour of the file descriptor at the
/// time of creation.
pub struct TimerFlags: c_int {
+ /// Set the `O_NONBLOCK` flag on the open file description referred to by the new file descriptor.
TFD_NONBLOCK;
+ /// Set the `FD_CLOEXEC` flag on the file descriptor.
TFD_CLOEXEC;
}
}