On 07.09.2023 22:10, Shawn Anastasio wrote:
> On 9/5/23 9:58 AM, Jan Beulich wrote:
>> On 01.09.2023 20:25, Shawn Anastasio wrote:
>>> +static inline atomic_t atomic_compareandswap(atomic_t old, atomic_t new,
>>> + atomic_t *v)
>>> +{
>>> + atomic_t rc;
>>> + rc.counter = __cmpxchg(&v->counter, old.counter, new.counter,
>>> sizeof(int));
>>
>> I can't seem to be able to spot where __cmpxchg() is defined. (I really
>> only wanted to check why it needs the 4th argument, which here rather
>> would want to be e.g. sizeof(v->counter). If it can't be omitted.)
>>
>
> As you later saw, it's defined in system.h later in patch 3. This was an
> error I made when splitting up the changes into this patchset. If you're
> fine with it I'll just add a mention in the commit message that the
> definitions in this commit are not yet fully usable.
Sure, that's going to be okay.
Jan