lkml.org 
[lkml]   [2017]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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?

\
 
 \ /
  Last update: 2017-03-24 21:47    [W:0.126 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site