Home
last modified time | relevance | path

Searched refs:TimerFd (Results 1 – 6 of 6) sorted by relevance

/external/crosvm/cros_async/src/
Dtimer.rs7 use sys_util::{Result as SysResult, TimerFd};
15 io_source: Box<dyn IoSourceExt<TimerFd>>,
19 pub fn new(timer: TimerFd, ex: &Executor) -> AsyncResult<TimerAsync> { in new() argument
25 pub(crate) fn new_poll(timer: TimerFd, ex: &FdExecutor) -> AsyncResult<TimerAsync> { in new_poll() argument
30 pub(crate) fn new_uring(timer: TimerFd, ex: &URingExecutor) -> AsyncResult<TimerAsync> { in new_uring() argument
47 impl IntoAsync for TimerFd {} implementation
57 let tfd = TimerFd::new().expect("failed to create timerfd"); in one_shot()
80 let tfd = TimerFd::new().expect("failed to create timerfd"); in one_shot_fd()
/external/crosvm/sys_util/src/
Dtimerfd.rs21 pub struct TimerFd(File); struct
23 impl TimerFd { implementation
26 pub fn new() -> Result<TimerFd> { in new()
34 Ok(TimerFd(unsafe { File::from_raw_fd(ret) })) in new()
39 pub fn try_clone(&self) -> std::result::Result<TimerFd, std::io::Error> { in try_clone() argument
40 self.0.try_clone().map(TimerFd) in try_clone()
137 impl AsRawFd for TimerFd { implementation
143 impl FromRawFd for TimerFd { implementation
145 TimerFd(File::from_raw_fd(fd)) in from_raw_fd()
149 impl IntoRawFd for TimerFd { implementation
[all …]
/external/crosvm/base/src/
Dtimer.rs13 use sys_util::{FakeTimerFd, TimerFd};
17 pub struct Timer(pub TimerFd);
20 TimerFd::new().map(Timer) in new()
71 build_timer!(Timer, TimerFd);
76 Timer(TimerFd::from_raw_fd(descriptor)) in from_raw_descriptor()
/external/rust/crates/nix/test/sys/
Dtest_timerfd.rs2 use nix::sys::timerfd::{ClockId, Expiration, TimerFd, TimerFlags, TimerSetTimeFlags};
7 let timer = TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_oneshot()
26 let timer = TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_interval()
49 let timer = TimerFd::new(ClockId::CLOCK_MONOTONIC, TimerFlags::empty()).unwrap(); in test_timerfd_unset()
/external/rust/crates/nix/src/sys/
Dtimerfd.rs41 pub struct TimerFd { struct
45 impl AsRawFd for TimerFd { argument
51 impl FromRawFd for TimerFd { implementation
53 TimerFd { fd } in from_raw_fd()
166 impl TimerFd { impl
274 impl Drop for TimerFd { implementation
/external/rust/crates/nix/
DCHANGELOG.md28 - `TimerFd` now closes the underlying fd on drop.
41 - Removed both `Copy` and `Clone` from `TimerFd`.
110 - Added support for `TimerFd`.