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
 
Format I-Type
Opcode 0x00D00073
Extension Zawrs

Operands

Related

More in Zawrs

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(); }