From: EXT Ola Liljedahl [mailto:[email protected]]
Sent: Thursday, October 15, 2015 10:55 PM
To: Savolainen, Petri (Nokia - FI/Espoo)
Cc: LNG ODP Mailman List
Subject: Re: [lng-odp] [API-NEXT PATCH 6/6] api: atomic: added 32 bit acquire 
and release

On 15 October 2015 at 10:45, Petri Savolainen 
<[email protected]<mailto:[email protected]>> wrote:
Added 32 bit acquire load/cas and release store/add/sub calls.
You only have cas_acquire. Don't you see a need for cas_release? I use that in 
one lockless design.

I see the beginning of a combinatorial explosion here. Why not just expose the 
atomic operations that take the memory ordering as a parameter?

-- Ola

I’m trying to limit the combinatory explosion here by defining only those 
combinations that are mostly used, which are: load – acquire and store – 
release, right? A memory order parameter would open the can of all kind of 
combinations that would then need more documentation telling which ones are 
actually legal, useful or high/low performance.

Cas_release is kind of odd combination – try to release something with cas that 
you own already? We can leave it out from API, if it’s a rarely needed/used 
combination. It’s easier to add later combinations that have a generally 
accepted use case, than remove those that are not really needed or useful.

-Petri


_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to