|
|
@ -216,7 +216,7 @@ impl MutexSupport for Spin {
|
|
|
|
unsafe {
|
|
|
|
unsafe {
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
asm!("pause" :::: "volatile");
|
|
|
|
asm!("pause" :::: "volatile");
|
|
|
|
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
|
|
|
|
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64", target_arch = "mips"))]
|
|
|
|
asm!("nop" :::: "volatile");
|
|
|
|
asm!("nop" :::: "volatile");
|
|
|
|
#[cfg(target_arch = "aarch64")]
|
|
|
|
#[cfg(target_arch = "aarch64")]
|
|
|
|
asm!("yield" :::: "volatile");
|
|
|
|
asm!("yield" :::: "volatile");
|
|
|
@ -254,7 +254,7 @@ impl MutexSupport for SpinNoIrq {
|
|
|
|
unsafe {
|
|
|
|
unsafe {
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
asm!("pause" :::: "volatile");
|
|
|
|
asm!("pause" :::: "volatile");
|
|
|
|
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
|
|
|
|
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64", target_arch = "mips"))]
|
|
|
|
asm!("nop" :::: "volatile");
|
|
|
|
asm!("nop" :::: "volatile");
|
|
|
|
#[cfg(target_arch = "aarch64")]
|
|
|
|
#[cfg(target_arch = "aarch64")]
|
|
|
|
asm!("yield" :::: "volatile");
|
|
|
|
asm!("yield" :::: "volatile");
|
|
|
|