Sujet : Re: smrproxy v2
De : jseigh_es00 (at) *nospam* xemaps.com (jseigh)
Groupes : comp.lang.c++Date : 28. Oct 2024, 12:45:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vfntgb$vete$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 10/28/24 00:02, Chris M. Thomasson wrote:
On 10/27/2024 5:35 PM, jseigh wrote:
On 10/27/24 18:32, Chris M. Thomasson wrote:
>
The membar version? That's a store/load membar so it is expensive.
I was wondering in your c++ version if you had to use any seq_cst barriers. I think acquire/release should be good enough. Now, when I say C++, I mean pure C++, no calls to FlushProcessWriteBuffers and things like that.
I take it that your pure C++ version has no atomic RMW, right? Just loads and stores?
While a lock action has acquire memory order semantics, if the
implementation has internal stores, you have to those stores
are complete before any access from the critical section.
So you may need a store/load memory barrier.
For cmpxchg, it has full cst_seq. For other rmw atomics I don't
know. I have to ask on c.a. I think some data dependency and/or
control dependency might factor in.
Joe Seigh