summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/thread/clock.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:21 +0000
commit4e8199b572f2035b7749cba276ece3a26630d23e (patch)
treef09feeed6a0fe39d027b1908aa63ea6b35e4b631 /vendor/rustix/src/thread/clock.rs
parentAdding upstream version 1.66.0+dfsg1. (diff)
downloadrustc-4e8199b572f2035b7749cba276ece3a26630d23e.tar.xz
rustc-4e8199b572f2035b7749cba276ece3a26630d23e.zip
Adding upstream version 1.67.1+dfsg1.upstream/1.67.1+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/thread/clock.rs')
-rw-r--r--vendor/rustix/src/thread/clock.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/vendor/rustix/src/thread/clock.rs b/vendor/rustix/src/thread/clock.rs
index 206703088..57672fa17 100644
--- a/vendor/rustix/src/thread/clock.rs
+++ b/vendor/rustix/src/thread/clock.rs
@@ -1,6 +1,6 @@
-use crate::{imp, io};
+use crate::{backend, io};
-pub use imp::time::types::Timespec;
+pub use backend::time::types::Timespec;
#[cfg(not(any(
target_os = "dragonfly",
@@ -12,7 +12,7 @@ pub use imp::time::types::Timespec;
target_os = "redox",
target_os = "wasi",
)))]
-pub use imp::time::types::ClockId;
+pub use backend::time::types::ClockId;
/// `clock_nanosleep(id, 0, request, remain)`—Sleeps for a duration on a
/// given clock.
@@ -30,6 +30,7 @@ pub use imp::time::types::ClockId;
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11.
+ target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "openbsd",
@@ -38,7 +39,7 @@ pub use imp::time::types::ClockId;
)))]
#[inline]
pub fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRelativeResult {
- imp::thread::syscalls::clock_nanosleep_relative(id, request)
+ backend::thread::syscalls::clock_nanosleep_relative(id, request)
}
/// `clock_nanosleep(id, TIMER_ABSTIME, request, NULL)`—Sleeps until an
@@ -57,6 +58,7 @@ pub fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRel
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11.
+ target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "openbsd",
@@ -65,7 +67,7 @@ pub fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRel
)))]
#[inline]
pub fn clock_nanosleep_absolute(id: ClockId, request: &Timespec) -> io::Result<()> {
- imp::thread::syscalls::clock_nanosleep_absolute(id, request)
+ backend::thread::syscalls::clock_nanosleep_absolute(id, request)
}
/// `nanosleep(request, remain)`—Sleeps for a duration.
@@ -80,7 +82,7 @@ pub fn clock_nanosleep_absolute(id: ClockId, request: &Timespec) -> io::Result<(
/// [Linux]: https://man7.org/linux/man-pages/man2/nanosleep.2.html
#[inline]
pub fn nanosleep(request: &Timespec) -> NanosleepRelativeResult {
- imp::thread::syscalls::nanosleep(request)
+ backend::thread::syscalls::nanosleep(request)
}
/// A return type for `nanosleep` and `clock_nanosleep_relative`.