In addition, releases and subsequent acquisitions of locks form  edges in the happens-before graph. A read is allowed to return the value of a write if that write is the last write to that variable before the read along some path in the happens-before order, or if the write is not ordered with respect to that read in the happens-before order.
Releases and subsequent acquisitions of locks form edges in the happens-before graph. A read can retrieve the value of a write if that write is the last write to the variable before the read along some path in the order of precedence, or if the write is not ordered with respect to the read in the order of precedence.