On Tue Aug 22 23:51:39 2023 +0000, Zebediah Figura wrote:
But this can't be possible, can it? Only the thread that successfully updated prev->next (i.e. this thread) can reach here. So that should just be assert(!prev), or am I missing something?
it's not possible among threads trying to add waiters, but some other thread might come along and change the lock pointer for something else. e.g. a thread releasing the lock could set the list_locked bit.