Re: [lttng-dev] [PATCH lttng-modules v3] Fix: atomic_add_unless() returns true/false rather than prior value

2017-03-08 Thread Mathieu Desnoyers
merged into master, 2.9, 2.8, thanks! Mathieu - On Mar 8, 2017, at 11:50 AM, Francis Deslauriers francis.deslauri...@efficios.com wrote: > The previous implementation assumed that `atomic_add_unless` returned > the prior value of the atomic counter when in fact it returned if the >

[lttng-dev] [PATCH lttng-modules v3] Fix: atomic_add_unless() returns true/false rather than prior value

2017-03-08 Thread Francis Deslauriers
The previous implementation assumed that `atomic_add_unless` returned the prior value of the atomic counter when in fact it returned if the addition was performed (true) or not performed (false). Since `atomic_add_unless` can not return INT_MAX, the `lttng_kref_get` always returned that the call