On first glance, I see 1 CAS-loop on `LL(…)’, and one or “more” CAS-loop(s) on the `SC(…)’. Actually, it seems as if it can spiral into many CAS-loops on `SC()’ side of the algorithm. Keep in mind that `setNLPred()’ also contains its own CAS-loop; `Transfer()’ has one too...
Actually, if I take the papers example code “literally”, and if (sizeof(int) == sizeof(void*)) happens to be true, then something like DWCAS will be required… ;^)
My algorithm has no loops. IMVVHO, since I am using raw atomic RMW operations that return no failure value in the sense that they _always_ mutate data. (e.g., Fetch-and-Add/Exchange instructions), well, that has to at least count for something damn it, on certain arch’s at least! ;^/
Need to study STPC some more! :^)
What do you think?
I hate dealing with any sort of imperial entanglement…
:^o
On first glance, I see 1 CAS-loop on `LL(…)’, and one or “more” CAS-loop(s) on the `SC(…)’. Actually, it seems as if it can spiral into many CAS-loops on `SC()’ side of the algorithm. Keep in mind that `setNLPred()’ also contains its own CAS-loop; `Transfer()’ has one too...
[...]
My algorithm has no loops.
On 14/02/13 23:07, jseig...@gmail.com wrote:
> C11 and C++11 left out the most powerful atomic primitives. Despite
> that you can do some limited implementations though they're much more
> complicated than they should be and a PITA to develop.
I'd love to know what primitives you think we left out. Pretty much
everything that was proposed for threading was included, and we're
actively seeking proposals for C++14 and C++17, so a clear description
of the desired facility could lead to it being in the next C++ standard.
> Also not
> helping, stdatomic.h seems to be missing from Ubuntu 12.10. I have no
> idea where it is or when or if it will ever show up.
I didn't think gcc was targetting C11. gcc 4.7 certainly has the
<atomic> header from C++11.
> http://sourceforge.net/projects/atomic-ptr-plus/files/stpc/
Interesting. I'll have to have a good look at this.