Skip to content

Commit

Permalink
Introduce timer_* support
Browse files Browse the repository at this point in the history
This commit adds support for the signal timer mechanism in POSIX, the
mirror to timerfd on Linux.

Resolves #1424

Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
  • Loading branch information
blt committed Dec 28, 2021
1 parent c77a872 commit b55d254
Show file tree
Hide file tree
Showing 7 changed files with 464 additions and 289 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -25,6 +25,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1547](https://github.com/nix-rust/nix/pull/1547))
- Added getter methods to `MqAttr` struct
(#[1619](https://github.com/nix-rust/nix/pull/1619))
- Added `timer` support
(#[1622](https://github.com/nix-rust/nix/pull/1622))

### Changed
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -70,7 +70,7 @@ sched = ["process"]
signal = ["process"]
socket = []
term = []
time = []
time = ["signal"]
ucontext = ["signal"]
uio = []
users = ["features"]
Expand Down
10 changes: 10 additions & 0 deletions src/sys/mod.rs
Expand Up @@ -201,3 +201,13 @@ feature! {
#[allow(missing_docs)]
pub mod timerfd;
}

#[cfg(any(target_os = "freebsd",
target_os = "illumos",
target_os = "linux",
target_os = "netbsd"
))]
feature! {
#![feature = "time"]
pub mod timer;
}

0 comments on commit b55d254

Please sign in to comment.