[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180405112243.GN4082@hirez.programming.kicks-ass.net>
Date: Thu, 5 Apr 2018 13:22:43 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Will Deacon <will.deacon@....com>
Cc: Ingo Molnar <mingo@...nel.org>,
Matthew Wilcox <mawilcox@...rosoft.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC] locking/mutex: Optimize __mutex_trylock_fast
On Thu, Apr 05, 2018 at 10:55:45AM +0100, Will Deacon wrote:
> > +#define atomic_long_try_cmpxchg_relaxed(l, old, new) \
> > + (ATOMIC_LONG_PFX(_try_cmpxchg_relaxed)((ATOMIC_LONG_PFX(_t) *)(l), \
> > + (ATOMIC_LONG_TYPE *)(old), (ATOMIC_LONG_TYPE)(new)))
>
> Are the casts on old and new strictly needed? We don't have them for the
> non-try versions...
It was required for the pointer; it doesn't want to convert (unsigned
long *) into (s64 *) without complaining about it :/
Powered by blists - more mailing lists