Re: problems with __sync_add_and_fetch in BPF code

Alexei Starovoitov

On Wed, Jul 18, 2018 at 8:01 AM, Pablo Alvarez via Lists.Iovisor.Org
<> wrote:
Hi Daniel,

Yes. If you look at the bug report, you will see that what it actually
returns is some form of the increment. that is,

__sync_add_and_fetch(myptr, increment)
I added a comment to bugzilla.
Thank you for bringing it up.
It was considered a known quirk before, but we should improve it.
__sync_add_and_fetch semantics are cleaner and more useful
than what we have today.

Join to automatically receive all group messages.