Can WRS.STO 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 short timeout
Like WRS.NTO but stall duration bounded by implementation-defined short timeout (10-100x cache miss latency). Part of Zawrs.
WRS.STO 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.sto ; bne x10, x12, retry».
Understand this scenario with real code like «lr.w x10, (x11) ; wrs.sto ; bne x10, x12, retry».
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.