qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] async: use explicit memory barriers and relaxed accesses


From: Paolo Bonzini
Subject: Re: [PATCH 4/4] async: use explicit memory barriers and relaxed accesses
Date: Tue, 7 Apr 2020 11:18:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 07/04/20 11:09, Stefan Hajnoczi wrote:
>>      if (blocking) {
>> -        atomic_add(&ctx->notify_me, 2);
>> +        atomic_set(&ctx->notify_me, atomic_read(&ctx->notify_me) + 2);
> Non-atomic "atomic" code looks suspicious and warrants a comment
> mentioning that this is only executed from one thread.  This applies to
> the other instances in this patch too.

Yes, that's the patch that is missing from this series, which
strengthens the assertion to ensure that we're in the home thread.

Paolo

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]