From 4e8199b572f2035b7749cba276ece3a26630d23e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:21 +0200 Subject: Adding upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/thread/clock.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'vendor/rustix/src/thread/clock.rs') 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`. -- cgit v1.2.3