We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PAUSE
core::arch
1 parent 6239a24 commit 59427f7Copy full SHA for 59427f7
crates/core_arch/src/riscv/mod.rs
@@ -1 +1,10 @@
1
//! RISC-V intrinsics
2
+
3
+/// Generates the `PAUSE` instruction
4
+///
5
+/// The PAUSE instruction is a HINT that indicates the current hart's rate of instruction retirement
6
+/// should be temporarily reduced or paused. The duration of its effect must be bounded and may be zero.
7
+#[inline(always)]
8
+pub fn pause() {
9
+ unsafe { asm!(".word 0x0100000F", options(nomem, nostack)) }
10
+}
0 commit comments