Messages in this thread | | | Date | Thu, 5 Apr 2018 13:22:43 +0200 | From | Peter Zijlstra <> | 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 :/
| |