WRS.NTO
Wait on Reservation Set (Normal Time-Out)
WRS.NTO
Stalls the hart until a reservation set is invalid or a short timeout expires. Used for efficient polling/spinlocks.
Encoding
Binary Layout
00000000110100000000000001110011
31:0
Operands
Related
More in Zawrs
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
WRS.NTO (Wait on Reservation Set, No Timeout) causes the hart to pause until the reservation set established by an LR instruction is invalidated or an interrupt or trap is pending. Unlike WFI, it is expected to resume on any reservation invalidation.
Operation
while (reservation_valid() && !timeout) { pause(); }