about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authordvdsk <noreply@davidsk.dev>2025-07-03 17:22:37 +0200
committerdvdsk <noreply@davidsk.dev>2025-07-06 17:49:35 +0200
commit61cf174dcea9e606d7c3e89c2df69e22ae888728 (patch)
tree101b621ceb2a49c1d846700c77c8b0b80621cc7e /library/std/src
parentf24ee2c9b15dc3734e9ebd74ba0563a1e6c545db (diff)
sleep_until: add clock_nanosleep support to Miri
The clock_nanosleep support is there to allow code using `sleep_until`
to run under Miri. Therefore the implementation is minimal.
- Only the clocks REALTIME and MONOTONIC are supported. The first is supported simply
because it was trivial to add not because it was needed for sleep_until.
- The only supported flag combinations are no flags or TIMER_ABSTIME only.
If an unsupported flag combination or clock is passed in this throws
unsupported.
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/pal/unix/thread.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs
index 3e4585c7187..53f0d1eeda5 100644
--- a/library/std/src/sys/pal/unix/thread.rs
+++ b/library/std/src/sys/pal/unix/thread.rs
@@ -297,6 +297,7 @@ impl Thread {
     }
 
     // Any unix that has clock_nanosleep
+    // If this list changes update the MIRI chock_nanosleep shim
     #[cfg(any(
         target_os = "freebsd",
         target_os = "netbsd",