On Wed, Mar 16, 2016 at 10:16:45PM +0000, Kári Tristan Helgason wrote: > This is very similar to the patch I had come up with for this issue. > > What is the reason for not using the local variable b in the trylock > in barrier_destroy()?
I want that assignment to happen once we are holding the lock and we're sure *barrier is valid. Otherwise another thread could clear it between the copy and the mutex lock.