Messages in this thread | | | Date | Fri, 24 Mar 2017 21:46:15 +0100 | From | Peter Zijlstra <> | Subject | Re: locking/atomic: Introduce atomic_try_cmpxchg() |
| |
On Fri, Mar 24, 2017 at 12:08:32PM -0700, Linus Torvalds wrote: > On Fri, Mar 24, 2017 at 10:23 AM, Peter Zijlstra <peterz@infradead.org> wrote: > > > > I tried a few variants, but nothing really made it better. > > So I really hate how your thing has two return values, and fakes the > second one using the pointer value.
Inspired by C11 I'm afraid..
> So how about we change the interface entirely, with the goal being > both type safety and good code generation?
I certainly like it better, but so far I'm having trouble reproducing your results. What compiler version are you on?
| |