On Wed Aug 23 06:11:00 2023 +0000, Yuxuan Shui wrote:
because the flag can get set immediately after we read it.
but the waiter is not added until we cmpxchg the lock ptr, and we would notice the flag got set and will retry.
when the list is in the "locked" state, `prev->head` isn't guaranteed to be up-to-date. but as you have also noted in another comment, we might not need all of the `head` pointers to be up-to-date. i haven't really thought that through, but if we do need all head pointers to be up-to-date, then we do need to care about the locked state.