From my previous experience of RISC-V programming with Rust, I found that Rust won't generate amoswap instruction for spin lock. That's why I wrote __sync_lock_release and __sync_lock_test_and_set in arch.rs. On that, spin crate will generate non-atomic instruction for implementing the lock, which may cause significant slowdown. This affects all Atomic type in Rust.
From my previous experience of RISC-V programming with Rust, I found that Rust won't generate
amoswapinstruction for spin lock. That's why I wrote__sync_lock_releaseand__sync_lock_test_and_setinarch.rs. On that,spincrate will generate non-atomic instruction for implementing the lock, which may cause significant slowdown. This affects allAtomictype in Rust.