Community
cancel
Showing results for 
Search instead for 
Did you mean: 
lib_team
Beginner
60 Views

atomic<T> memory semantics

Hi,

I've been through a few threads on the tbb forum that talk about atomic and the lack ofunfenced/relaxed memomy semantic, but I didn't managed tounderstand the reasons of that choice.
Can someone explain? Isn't unfenced semantic usefull (when the processor supports it at least)?

Regards
0 Kudos
2 Replies
RafSchietekat
Black Belt
60 Views

x86 doesn't...
Dmitry_Vyukov
Valued Contributor I
60 Views

Relaxed atomics are definitely useful. The usage that justifies them single-handed is atomic reference counting.
My guess as to why TBB does not feature relaxed atomics is that, well, it's heavily rooted in x86 systems regardless of declared portability. Another possible reason is that AFAICT TBB is never declare atomics as a first-class user API.

Reply