Messages in this thread | | | Date | Sat, 14 May 2022 00:18:20 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v2 2/2] locking/atomic/x86: Introduce arch_try_cmpxchg64 |
| |
On Fri, May 13, 2022 at 05:30:09PM +0200, Uros Bizjak wrote:
> +#define arch_try_cmpxchg64(ptr, po, n) \ > + ((__typeof__(*(ptr)))__try_cmpxchg64((ptr), (unsigned long long *)(po), \ > + (unsigned long long)(n)))
That doesn't look right (unless it's so late I really can't read anymore, in which case ignore me and I'll try again on monday). But the return value of try_cmpxchg is bool, not typeof(*ptr).
| |