Speed up trace mode (GSoC Project)

Mihir Luthra 1999mihir.luthra at gmail.com
Wed May 1 06:27:14 UTC 2019


Hi Clemens,

For making my implementation of shared memory data structure more space
efficient, I was trying to implement a stack which stores offsets to unused
locations in the shared memory file. But as stack is being shared it also
needs to be edited in a lock free way. While editing stack I need to
atomically CAS both top of stack and the element on it. For this I found
double compare and swap. Also, in my data structure at one point I need
DCAS as well to ensure correct editing.
To implement DCAS I came across some instruction “cmpxchg16”. But I think
its still not as per my need. [1]

Do you know any alternative with which I can DCAS atomically or anything
which atomically checks 2 old values before replacing value at an address?

[1]
https://stackoverflow.com/questions/7646018/sse-instructions-which-cpus-can-do-atomic-16b-memory-operations

Regards,
Mihir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190501/c3313a1c/attachment.html>


More information about the macports-dev mailing list