Can WRS.NTO replace LR/SC?
No. It only waits for events related to an existing reservation set; synchronization algorithms still need LR/SC, AMO, or CAS operations to update state.
Wait on reservation set with no timeout
Stalls the hart in a low-power state until a store occurs to the reservation set or a pending interrupt is observed. Must be used with LR. Part of Zawrs for energy-efficient polling.
WRS.NTO is a Zawrs wait-on-reservation-set instruction used with a prior LR reservation, allowing the hart to temporarily stall while waiting for a store to the reserved location.
Understand this scenario with real code like «lr.w x10, (x11) ; wrs.nto».
Understand this scenario with real code like «lr.w x10, (x11) ; wrs.nto».
Understand this scenario with real code like «lr.w x10, (x11) ; wrs.nto».
No. It only waits for events related to an existing reservation set; synchronization algorithms still need LR/SC, AMO, or CAS operations to update state.
No. The spec allows an implementation to occasionally terminate the stall for any reason, so software must re-check the condition in a loop.