Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651584

Re: [PATCH 5/8] x86: switch atomic.h to use atomic-instrumented.h

From Dmitry Vyukov <dvyukov@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/8] x86: switch atomic.h to use atomic-instrumented.h
Date 2017-05-26 21:30 +0200
Message-ID <tLt5T-1sR-1@gated-at.bofh.it> (permalink)
References <tq20H-1Mi-39@gated-at.bofh.it> <tq20H-1Mi-37@gated-at.bofh.it> <tq2an-1Rr-33@gated-at.bofh.it> <tqlZo-7yI-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 29, 2017 at 3:37 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> On Tue, Mar 28, 2017 at 06:25:07PM +0200, Dmitry Vyukov wrote:
>> On Tue, Mar 28, 2017 at 6:15 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>
>> >  #define __try_cmpxchg(ptr, pold, new, size)                            \
>> >         __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX)
>> >
>> > -#define try_cmpxchg(ptr, pold, new)                                    \
>> > +#define arch_try_cmpxchg(ptr, pold, new)                               \
>> >         __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr)))
>>
>> Is try_cmpxchg() a part of public interface like cmpxchg, or only a
>> helper to implement atomic_try_cmpxchg()?
>> If it's the latter than we don't need to wrap them.
>
> De-facto, it's an x86-specific helper. It was added in commit:
>
>     a9ebf306f52c756c ("locking/atomic: Introduce atomic_try_cmpxchg()")
>
> ... which did not add try_cmpxchg to any generic header.
>
> If it was meant to be part of the public interface, we'd need a generic
> definition.

Fixed in v2:
https://groups.google.com/forum/#!topic/kasan-dev/3PoGcuMku-w

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 5/8] x86: switch atomic.h to use atomic-instrumented.h Dmitry Vyukov <dvyukov@google.com> - 2017-05-26 21:30 +0200

csiph-web