On Sat, Apr 13, 2019 at 01:22:50PM -0400, Waiman Long wrote:
> +/*
> + * This is safe to be called without holding the wait_lock.

Because.... @waiter is *our* waiter and it's not going anywhere. So when
it's first, it stays first until we do something about it.

> + */
> +static inline bool
> +rwsem_waiter_is_first(struct rw_semaphore *sem, struct rwsem_waiter *waiter)
> +{
> +     return list_first_entry(&sem->wait_list, struct rwsem_waiter, list)
> +                     == waiter;
> +}

Reply via email to