On Wed, 19 Feb 2025 20:36:13 -0500
Waiman Long <llong@xxxxxxxxxx> wrote:
Now if we have a two fields to read:Right. I forgot it is an atomic_long_t. In that case, no lock should beDo we need to take it just for accessing owner, which is in an atomic?this field, we don't need to take lock, though taking the wait_lock may
still be needed to examine other information inside the mutex.
needed.
block_flags (for the type of lock) and blocked_on (for the lock)
We need a way to synchronize the two. What happens if we read the type, and
the task wakes up and and then blocks on a different type of lock?
Then the lock read from blocked_on could be a different type of lock than
what is expected.