lkml.org 
[lkml]   [2016]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 4/4] futex: Rewrite FUTEX_UNLOCK_PI
On Fri, 7 Oct 2016, Peter Zijlstra wrote:
> + /*
> + * Grab a reference on the pi_state and drop hb->lock.
> + *
> + * The reference ensures pi_state lives, dropping the hb->lock
> + * is tricky.. wake_futex_pi() will take rt_mutex::wait_lock to
> + * close the races against futex_lock_pi(), but in case of
> + * _any_ fail we'll abort and retry the whole deal.
> + */
> + WARN_ON_ONCE(!atomic_inc_not_zero(&pi_state->refcount));
> + spin_unlock(&hb->lock);
> +
> + ret = wake_futex_pi(uaddr, uval, pi_state);
> +
> + put_pi_state(pi_state);
> +
> /*
> * In case of success wake_futex_pi dropped the hash
> * bucket lock.

This comment has become stale.

Thanks,

tglx

\
 
 \ /
  Last update: 2016-10-08 20:26    [W:0.193 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site